Using the context within the order confirmation mail template will rise an StoreNotFoundException.
Reason: When starting messenger:consume coreshop_notification, the CachedStoreContext instantly gets triggered ⇾ no store could be found ⇾ initialized will be set to true ⇾ never gets checked again in incoming messages.
Since the messenger may not provide a request, this is correct anyway, but to provide a store within the messenger context? Currently, i just created custom store resolver with a low priority which loads the default store.
@solverat https://github.com/coreshop/CoreShop/pull/2727 should fix it. But usually, in a Mail, you should not rely on the StoreContext. You should rather use the Store assigned to the Order.
Given:
Using the context within the order confirmation mail template will rise an
StoreNotFoundException
.Reason: When starting
messenger:consume coreshop_notification
, theCachedStoreContext
instantly gets triggered ⇾ no store could be found ⇾initialized
will be set totrue
⇾ never gets checked again in incoming messages.However, this worked before https://github.com/coreshop/CoreShop/pull/2562, because of the
cachedStore === null
check.Since the messenger may not provide a request, this is correct anyway, but to provide a store within the messenger context? Currently, i just created custom store resolver with a low priority which loads the default store.