This repository has been archived by the owner on Jun 8, 2024. It is now read-only.
Cloned instance of template breaks subshop compatibility #13
Labels
kind/bug
Something isn't working
PHP Version
7.4
Shopware Version
5.7.11
Actual behaviour
Hi,
I'm refering to this commit: 1dcc559
Cloning the instance breaks the subshop compatibility in our shop. The result is really strange. See example below.
Assume a system with a freshly cleared cache. I make an order in our German shop and get a correct order mail. I than make an order in our Dutch shop and I get an order mail with sender, subject and footer from the German shop. If I make an order in any other subshop, I still get an order mail with sender, subject and footer from the German shop.
It will stay like this until I clear the cache again. I found out that it is enough to clear the template cache. After clearing the template cache, I get mails with sender, subject and footer from the shop, that is cached first.
What is the advantage here to clone the object? Is this compulsory? If I revert commit 1dcc559, than the mails are fine and I can't find any downsides. But I would prefer to find the reason why the cloned object is dependent on the template cache.
Additional info: I can reproduce this behaviour only on our AWS EC2 instances but not on our physical dev servers. I have no clue why the clone function and the template cache behave differently on these systems. I am grateful for any advice.
Thank you for feedback in advance.
Expected behaviour
Mails are always sent in the right context
Steps to Reproduce?
The text was updated successfully, but these errors were encountered: