Closed ChristopherDosin closed 2 years ago
If any questions, please ask.
If any questions, please ask.
Hi @LarsPauwels . I created a simple form plugin to simulate this bug.But i could not make this error.Can you help me how to create this bug.
We had a problem with the combination of the shortcode plugin and the back in stock plugin (https://store.shopware.com/en/zeobv82482397379/back-in-stock-notifications-plugin-of-the-month.html). If I compare your test with the plugin setup then I found out that the submit endpoint contains the store-api scope instead of the storefront scope.
So I think you need to change the scope in the file src/Controller/SubmitFormController.php.
@LarsPauwels So in this case it should be fixed within the GetNotified
plugin you use, right?
As far as I can see this would fix it.
Okay, then i will close this issue. If there're any problems feel free to create a new one or re-open it.
Super. I will test this right now.
I looked at it and there are multiple plugins using this way. So I can't change alle the plugins that use a different scope. The problem is that if a different scope is used the host null is. So In the shortcode plugin needs to be a check of some sort the prevent this error.
We have found a compatibility issue with the Shortcodes plugin and plugins that contains html forms (ex. ).
When we submit a form with a post request, this will load a new page and will trigger ResponseSubscriber where an error is returned (see image below). This error is produced by the subscriber ResponseSubscriber at sas/shortcode/src/Subscriber/ResponseSubscriber.php because the $host returns null when the page is loaded by a form.Back in stock notifications.