mydreamday-fi / site

mydreamday.fi (Magento 2)
https://upwork.com/fl/mage2pro
0 stars 0 forks source link

«Environment emulation nesting is not allowed» on sending invoice / shipment / creditmemo emails #24

Closed dmitrii-fediuk closed 9 months ago

dmitrii-fediuk commented 9 months ago

Similar to https://github.com/cabinetsbay/site/issues/12

[
    Mage2.PRO: {
        "mage2pro/core": "10.6.0",
        "Magento": "2.4.6",
        "PHP": "8.1.21",
        "URL": "https://mydreamday.fi/admin_<…>/sales/order_creditmemo/email/creditmemo_id/1807/order_id/72736/",
        "Time": "2024-02-12 07:33:04",
        "Referer": "https://mydreamday.fi/admin_<…>/sales/order_creditmemo/view/creditmemo_id/1807/",
        "IP Address": "91.150.30.40",
        "Request Method": "GET",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
    }
    channel: main
    context: []
    datetime: Monolog\DateTimeImmutable "2024-02-12T07:33:04.944888+00:00"
    extra: []
    level: 400
    level_name: ERROR
    message: Environment emulation nesting is not allowed.
]

1   Df\Framework\Log\Dispatcher::handle
    https://github.com/mage2pro/core/tree/10.6.0/Framework/Log/Dispatcher.php#L97
    vendor/mage2pro/core/Framework/Log/Dispatcher.php:97

2   Monolog\Logger::addRecord
    vendor/monolog/monolog/src/Monolog/Logger.php:399

3   Monolog\Logger::error
    vendor/monolog/monolog/src/Monolog/Logger.php:650

4   Magento\Framework\Logger\LoggerProxy::error
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Logger/LoggerProxy.php#L130
    vendor/magento/framework/Logger/LoggerProxy.php:130

5   Magento\Store\Model\App\Emulation::startEnvironmentEmulation
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Store/Model/App/Emulation.php#L126
    vendor/magento/module-store/Model/App/Emulation.php:126

6   Magento\Payment\Helper\Data::getInfoBlockHtml
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Payment/Helper/Data.php#L223
    vendor/magento/module-payment/Helper/Data.php:223

7   Magento\Payment\Helper\Data::getInfoBlockHtml
    generated/code/Magento/Payment/Helper/Data/Interceptor.php:59

8   Magento\Sales\Model\Order\Email\Sender\CreditmemoSender::getPaymentHtml
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoSender.php#L179
    vendor/magento/module-sales/Model/Order/Email/Sender/CreditmemoSender.php:179

9   Magento\Sales\Model\Order\Email\Sender\CreditmemoSender::send
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoSender.php#L129
    vendor/magento/module-sales/Model/Order/Email/Sender/CreditmemoSender.php:129

10  Magento\Sales\Model\AbstractNotifier::notify
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Sales/Model/AbstractNotifier.php#L59
    vendor/magento/module-sales/Model/AbstractNotifier.php:59

11  Magento\Sales\Model\Order\CreditmemoNotifier::notify
    generated/code/Magento/Sales/Model/Order/CreditmemoNotifier/Interceptor.php:23

12  Magento\Sales\Model\Service\CreditmemoService::notify
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Sales/Model/Service/CreditmemoService.php#L136
    vendor/magento/module-sales/Model/Service/CreditmemoService.php:136

13  Magento\Sales\Model\Service\CreditmemoService::notify
    generated/code/Magento/Sales/Model/Service/CreditmemoService/Interceptor.php:41

14  Magento\Sales\Controller\Adminhtml\Creditmemo\AbstractCreditmemo\Email::execute
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/Email.php#L34
    vendor/magento/module-sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/Email.php:34

15  Magento\Sales\Controller\Adminhtml\Order\Creditmemo\Email::___callParent
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L58
    vendor/magento/framework/Interception/Interceptor.php:58

16  Magento\Sales\Controller\Adminhtml\Order\Creditmemo\Email::Magento\Framework\Interception\{closure}
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L138
    vendor/magento/framework/Interception/Interceptor.php:138

17  Magento\Sales\Controller\Adminhtml\Order\Creditmemo\Email::___callPlugins
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L153
    vendor/magento/framework/Interception/Interceptor.php:153

18  Magento\Sales\Controller\Adminhtml\Order\Creditmemo\Email::execute
    generated/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Email/Interceptor.php:23

19  Magento\Framework\App\Action\Action::dispatch
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/Action/Action.php#L111
    vendor/magento/framework/App/Action/Action.php:111

20  Magento\Backend\App\AbstractAction::dispatch
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Backend/App/AbstractAction.php#L151
    vendor/magento/module-backend/App/AbstractAction.php:151

21  Magento\Sales\Controller\Adminhtml\Order\Creditmemo\Email::___callParent
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L58
    vendor/magento/framework/Interception/Interceptor.php:58

22  Magento\Sales\Controller\Adminhtml\Order\Creditmemo\Email::Magento\Framework\Interception\{closure}
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L138
    vendor/magento/framework/Interception/Interceptor.php:138

23  Magento\Backend\App\Action\Plugin\Authentication::aroundDispatch
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Backend/App/Action/Plugin/Authentication.php#L145
    vendor/magento/module-backend/App/Action/Plugin/Authentication.php:145

24  Magento\Sales\Controller\Adminhtml\Order\Creditmemo\Email::Magento\Framework\Interception\{closure}
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L135
    vendor/magento/framework/Interception/Interceptor.php:135

25  Magento\Sales\Controller\Adminhtml\Order\Creditmemo\Email::___callPlugins
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L153
    vendor/magento/framework/Interception/Interceptor.php:153

26  Magento\Sales\Controller\Adminhtml\Order\Creditmemo\Email::dispatch
    generated/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Email/Interceptor.php:32

27  Magento\Framework\App\FrontController::getActionResponse
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/FrontController.php#L245
    vendor/magento/framework/App/FrontController.php:245

28  Magento\Framework\App\FrontController::processRequest
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/FrontController.php#L212
    vendor/magento/framework/App/FrontController.php:212

29  Magento\Framework\App\FrontController::dispatch
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/FrontController.php#L147
    vendor/magento/framework/App/FrontController.php:147

30  Magento\Framework\App\FrontController::___callParent
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L58
    vendor/magento/framework/Interception/Interceptor.php:58

31  Magento\Framework\App\FrontController::Magento\Framework\Interception\{closure}
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L138
    vendor/magento/framework/Interception/Interceptor.php:138

32  Magento\Framework\App\FrontController::___callPlugins
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L153
    vendor/magento/framework/Interception/Interceptor.php:153

33  Magento\Framework\App\FrontController::dispatch
    generated/code/Magento/Framework/App/FrontController/Interceptor.php:23

34  Magento\Framework\App\Http::launch
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/Http.php#L116
    vendor/magento/framework/App/Http.php:116

35  Magento\Framework\App\Http::___callParent
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L58
    vendor/magento/framework/Interception/Interceptor.php:58

36  Magento\Framework\App\Http::Magento\Framework\Interception\{closure}
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L138
    vendor/magento/framework/Interception/Interceptor.php:138

37  Df\Framework\Plugin\App\Http::aroundLaunch
    https://github.com/mage2pro/core/tree/10.6.0/Framework/Plugin/App/Http.php#L10
    vendor/mage2pro/core/Framework/Plugin/App/Http.php:10

38  Magento\Framework\App\Http::Magento\Framework\Interception\{closure}
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L135
    vendor/magento/framework/Interception/Interceptor.php:135

39  Magento\Framework\App\Http::___callPlugins
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L153
    vendor/magento/framework/Interception/Interceptor.php:153

40  Magento\Framework\App\Http::launch
    generated/code/Magento/Framework/App/Http/Interceptor.php:23

41  Magento\Framework\App\Bootstrap::run
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/Bootstrap.php#L264
    vendor/magento/framework/App/Bootstrap.php:264
dmitrii-fediuk commented 9 months ago

How did I fix «Environment emulation nesting is not allowed» on sending invoice / shipment / creditmemo emails in 2.4.4 ≤ Magento < 2.4.7-beta2?