-1

this topic shows a solution for the broken POST requests due to Magento 2.3 upgrade. However the solution is breaking the compatibility of my module with Magento <2.3 shops.

Can anyone think of a workaround to support older versions as well?

0

This solves the problem, but after that your module will not work on Magento 2.2 and earlier. https://magento.stackexchange.com/a/255082/75860

  • Thanks for your response. This was the topic I was referring to in my original post. – sixer1182 Jan 24 at 13:21
0

After a quite a bit of research I did not find a solution not breaking the backwards compatibility. I settled with a fork of the original module which I patched as described here.

There is a way to make the fix compatible with Magento 2.2 by getting rid of the '?' in method overrides. However there is no way to make it compatible with Magento 2.0 or 2.1 since the required PHP Versions do not support the method headers you have to match in order to implement the CsrfAwareActionInterface.

The only solution might be something not requiring to implement the CsrfAwareActionInterface at all.

0

I have updated the original answer to Magento 2.3 upgrade breaks HTTP POST requests to custom module endpoint to include a backwards compatible solution.

  • Your linked topic is already in the original post and does not contain a backwards compatible solution. Thanks anyway. – sixer1182 Apr 16 at 18:21

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.