Firstly I know how to deploy and work with files, I don’t need answers saying ‘redeploy static content’ or ‘clean cache’ – experience from the research.
We having an issue on our development server. We have tested it with multiple projects, versions vary from 2.1.5 to the 2.2.3 open source.
After steps below we are receiving random 400 errors on some files (1-10 files). All those files are .js.
FUN PART:
After trying to get that file again (open in new tab) – everything is working fine, file is there, nothing bad.
After trying hard refresh again – again errors, but on other files.
After multiple soft refreshes (F5) – it looks good again.
Deployment mode – Developer
Steps to reproduce
- Install Magento without Sample date (tested with 2.2.3) – nothing configured.
- Set deployment mode Developer
- Deploy static content or just clean /pub/static/
- Chrome/Firefox – Inspector->Network tab->Disable cache (CHECKED)
- Clear site data on the browser.
- Create a product – for testing.
- Go to the website and then to the product (no errors even after hard refresh).
- Add product to the cart. (no errors even after hard refresh).
- Go for example to the category. (errors even after hard refresh).
- After clearing site data – everything looks fine again.
- We have reproduced this on multiple pc’s / webbrowsers.
Server info:
PHP: 7.1.16
APACHE: 2.4.33
DirectAdmin 1.52.0
Debian: 8
Any suggestion what to do or what to check/change will be useful (except a stupid ones, no one likes those)
P.S. I was not sure if I should post it here or magento.stackexchange.com
Or if I can post on both websites at the same time.
2
Answers
Good morning all
After all we have found an issue. It was an apache module : mod_ruid2 After it was disabled - no more random 400 errors has appeared.
I hope this anwer will help someone even if this is an uncommon issue.
To turn the module off, you need to do the following steps in the command line: