Question

We've had a recurring issue with Magento 2.2 where (for some reason I don't understand) the "Attention: Something went wrong." message appears on every page.

We get the default message about a "technical error on the server" but there is nothing in any error log to indicate what might be going wrong, and nothing loads and no form entries work.

However, I have discovered what is causing the issue and I am rather perplexed by it.

The issue is that when an AJAX call is made, the parameters in POST/GET/REQUEST are not making it to the Magento system, and I don't understand why.

To be clear, when the admin makes a call to /admin/mui/index/render/ to get notifications, it sends several parameters (namespace, sorting[field], sorting[direction] and isAjax). When the action is executed in the PHP, the $_REQUEST array is empty.

It is not limited to just that one call - any call over AJAX seems to be affected, and it is causing quite a few issues with even doing basic things like saving configuration changes.

It seems that forcing a condition Magento doesn't expect (fatal exception, or die()) puts it back to normal for a while, but it keeps recurring so there is a persistent issue, and fixing it for one AJAX call doesn't seem to fix it for others.

What I'm wondering is if someone has any clue what the issue might be (willing to accept it could be a misconfigured server) or whether I should be raising this as an issue in the repo. I've not found any sign anyone else is having the same issue which seems to suggest that it could be a localised issue but I have no idea what it could be.

Was it helpful?

Solution

It seems it was due to the htaccess authentication. Don't know why it didn't affect all users all the time, but now that we've applied an IP whitelist, the issue hasn't been reported for a week.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top