Skip to content

Fetching Mollie order status in backend causes error #19

@peterjaap

Description

@peterjaap

There is a Mollie Fetch Status button in the Magento backend:

image

When clicked, and the status is Paid, the observer in this extension is triggered. But it gives an error:

[2023-02-02T14:17:53.610338+00:00] main.INFO: elgentos_serversideanalytics_requests:  ["https://ssl.google-analytics.com/collect?ti=2000000384&tr=13.94&tt=2.42&ts=8.9900&ta=Main%20Website%0ATepper%20Efka%20-%20Store%0AEnglish&v=1&tid=UA-22992695-19&uip=144.178.244.242&cid=470046374.1675346692&dp=%2Fcheckout%2Fonepage%2Fsuccess%2F&pa=purchase&ec=Checkout&ea=Purchase&t=event&pr1id=AL%20668000&pr1nm=Airolube%20De-Icer%20%2F%20Windshield%20defroster%20-%20500ml%20Spray&pr1pr=4.9500&pr1qt=1.0000"] []
[2023-02-02T14:17:55.987210+00:00] main.ERROR: Environment emulation nesting is not allowed. [] []

This is because the environment emulation is already running for this store.

Maybe we can check which store it is emulating and if it's the same, skip starting it here? https://github.com/elgentos/magento2-serversideanalytics/blob/master/Observer/SendPurchaseEvent.php#L65

And if it is not the same, stop the current emulation, start the one we need, and restart the original? Or would that have some adverse effects?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions