0

Got a strange scenario on magento install

A couple of assets in the backend 404 which means you can't edit products

/pub/static/adminhtml/Magento/backend/en_GB/Magento_ConfigurableProduct/js/variations/variations.js
/pub/static/adminhtml/Magento/backend/en_GB/Magento_Variable/variables.js

The only reason we can can see is because they contain the string var in the name.

If you rename them they load.

Can't figure out why.

  • cPanel server
  • Apache
  • php 7.1
  • Magento 2.2.3

Any ideas?

  • Have you tried redeploying your site? before you redeploy again delete the var/view_processed folder and this should create a whole new version in magento if you still have issues it may be a permission issue on the server – Dava Gordon Sep 10 at 11:21
  • @DavaGordon Yes. Migrated files to another server and it works fine. Deployment works. Themes are compiling. Files exist. Permissions are correct. Renaming either so doesn't contain the string var and they load - so to clarify same file / same location. So it's something specific to hosting for this website and/or htaccess and the string var. – Dominic Xigen Sep 10 at 11:34
  • I had an issue with 2.2 a while back can you switch from production to developer and back just want to see if its been fixed. – Dava Gordon Sep 10 at 11:37
  • @DavaGordon switched from production to developer and back again and still same issue – Dominic Xigen Sep 10 at 11:58
  • so you have run bin/magento setup:static-content:deploy en_US en_GB -f – Dava Gordon Sep 10 at 11:59
0

Our hosts managed to track down the source of the issue

There was an apache magento.conf file buried in the cPanel file system under userdata for this particular user which essentially had a wildcard value which meant that anything that contained the string 'var' was set to deny

It's path went something like this

./conf.d/userdata/std/[apache_version]/[username]/[domain]/magento.conf

./conf.d/userdata/ssl/[apache_version]/[username]/[domain]/magento.conf

No idea on how or why. I can't be more specific as I'm relaying information and I didn't get to see the file contents.

Hope this helps someone one day and helps you rule out an issue with Magento much quicker and you can get on to the hosts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.