we are noticing a strange behaviour on a CE 2.2.6 which we can't interpret. We didn't do any updates, it's possible that an OpCache/Redis flush let come up an error from an update before. Each time we are calling a URL in an XHR Request with a timestamp included like ?_=1540374954091, we are receiving an Error 500 from nginx.

If we replace the underscore with a regular var name like ?a=b the error doesn't come up, so there's a possible relation with non-cachable requests.

The log says:

2018/10/24 14:20:06 [error] 2924#2924: *2225 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Magento\Theme\Controller\Result\MessagePlugin::afterRenderResult() must implement interface Magento\Framework\Controller\ResultInterface, null given, called in /var/www/html/vendor/magento/framework/Interception/Interceptor.php on line 146 and defined in /var/www/html/vendor/magento/module-theme/Controller/Result/MessagePlugin.php:79
Stack trace:
#0 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Theme\Controller\Result\MessagePlugin->afterRenderResult(Object(Magento\Framework\Controller\Result\Json\Interceptor), NULL, Object(Magento\Framework\App\Response\Http\Interceptor))
#1 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\Controller\Result\Json\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#2 /var/www/html/generated/code/Magento/Framework/Controller/Result/Json/Interceptor.php(91): Magento\F" while reading response header from upstream, client: 93.131.xx.xxx, server: www.xxx.com, request: "GET /popup/Popup/Index/?_=1540374954091 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "www.xxx.com"

It's a composer based installation, the Magento\Framework\Controller\ResultInterface is in place. Any ideas how to debug etc.?

Thanks Jan

  • Welcome Friend to Magento Stackexchange, Are you facing this on every page? – Ramkishan Suthar Oct 24 '18 at 12:37
  • Thanks Ramkishan! Yes and no. I could trigger it on each page by adding a get var like ?_=whatever to the URL. You can see it live at makerdise.com/?_=test. If you visit another page like home regularly with open dev console, you can see the XHR call to the popup controller resulting in error 500. – gewaechshaus Oct 24 '18 at 12:42
  • ok let me check if I can generate it on my local. – Ramkishan Suthar Oct 24 '18 at 12:45
  • I tested some other systems, no error like in our case at mag2opensource.basecom.de/?_=123 magento.nublue.co.uk/?_=123 In our backend section, we aren't facing that... STRANGE – gewaechshaus Oct 24 '18 at 12:51
  • Maybe related to wrong class mapping? I can't find out why interface Magento\Framework\Controller\ResultInterface is null in this case. – gewaechshaus Oct 24 '18 at 12:57

We found a bug in a 3rd party module (Mirasvit_Seo).

  • What kind of bug is this? Can you please explain more. It'll be helpful for others. – Ramkishan Suthar Oct 24 '18 at 17:26
  • For sure: a newly introduced plugin (Mirasvit\Seo\Plugin\ChangeResult\ChangeContent) extends the ResultInterface . The class has a method called afterRenderResult, it will bring up an error in case of attached underscores in the querystring, affecting the complete Interface. – gewaechshaus Oct 25 '18 at 8:46
  • most welcome, Always happy to help everyone. – Ramkishan Suthar Oct 25 '18 at 9:08

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.