dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
48 stars 63 forks source link

Update TemplatePlugin.php #523

Closed dzierzega closed 5 years ago

dzierzega commented 5 years ago

The registry is crashing magento admin panel when i want to go to store->configuration->sales->sales emails . Stack trace: 1 exception(s): Exception #0 (RuntimeException): Registry key "dotmailer_current_template_id" already exists

Exception #0 (RuntimeException): Registry key "dotmailer_current_template_id" already exists

0 /app/releases/20181019094613Z/vendor/dotmailer/dotmailer-magento2-extension/Plugin/TemplatePlugin.php(223): Magento\Framework\Registry->register('dotmailer_curre...', '2')

1 /app/releases/20181019094613Z/vendor/dotmailer/dotmailer-magento2-extension/Plugin/TemplatePlugin.php(143): Dotdigitalgroup\Email\Plugin\TemplatePlugin->saveTemplateIdInRegistry('2')

2 /app/releases/20181019094613Z/vendor/dotmailer/dotmailer-magento2-extension/Plugin/TemplatePlugin.php(60): Dotdigitalgroup\Email\Plugin\TemplatePlugin->getProcessedTemplatePreviewAndOther('2', Array)

3 /app/releases/20181019094613Z/vendor/magento/framework/Interception/Interceptor.php(146): Dotdigitalgroup\Email\Plugin\TemplatePlugin->afterGetData(Object(Magento\Email\Model\Template\Interceptor), '2', 'template_id', NULL)

4 /app/releases/20181019094613Z/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Email\Model\Template\Interceptor->Magento\Framework\Interception{closure}('template_id', NULL)

5 /app/releases/20181019094613Z/generated/code/Magento/Email/Model/Template/Interceptor.php(923): Magento\Email\Model\Template\Interceptor->___callPlugins('getData', Array, Array)

6 /app/releases/20181019094613Z/vendor/magento/framework/DataObject.php(385): Magento\Email\Model\Template\Interceptor->getData('template_id', NULL)

7 /app/releases/20181019094613Z/generated/code/Magento/Email/Model/Template/Interceptor.php(1090): Magento\Framework\DataObject->__call('getTemplateId', Array)

8 /app/releases/20181019094613Z/vendor/magento/module-email/Model/Template.php(182): Magento\Email\Model\Template\Interceptor->__call('getTemplateId', Array)

9 /app/releases/20181019094613Z/generated/code/Magento/Email/Model/Template/Interceptor.php(24): Magento\Email\Model\Template->getId()

10 /app/releases/20181019094613Z/vendor/magento/framework/Data/Collection.php(435): Magento\Email\Model\Template\Interceptor->getId()

11 /app/releases/20181019094613Z/vendor/magento/framework/Data/Collection/AbstractDb.php(173): Magento\Framework\Data\Collection->_getItemId(Object(Magento\Email\Model\Template\Interceptor))

12 /app/releases/20181019094613Z/vendor/magento/framework/Data/Collection.php(400): Magento\Framework\Data\Collection\AbstractDb->_getItemId(Object(Magento\Email\Model\Template\Interceptor))

13 /app/releases/20181019094613Z/vendor/magento/framework/Data/Collection/AbstractDb.php(584): Magento\Framework\Data\Collection->addItem(Object(Magento\Email\Model\Template\Interceptor))

14 /app/releases/20181019094613Z/vendor/magento/framework/Data/Collection/AbstractDb.php(559): Magento\Framework\Data\Collection\AbstractDb->loadWithFilter(false, false)

15 /app/releases/20181019094613Z/vendor/magento/module-config/Model/Config/Source/Email/Template.php(57): Magento\Framework\Data\Collection\AbstractDb->load()

adeelq commented 5 years ago

@dzierzega Can you please create your PR to develop branch as per https://github.com/dotmailer/dotmailer-magento2-extension#contribution . I'm closing this one

dzierzega commented 5 years ago

Dear Adeel,

PR here: https://github.com/dotmailer/dotmailer-magento2-extension/pull/527

wt., 6 lis 2018 o 10:04 Adeel Qamar notifications@github.com napisał(a):

Closed #523 https://github.com/dotmailer/dotmailer-magento2-extension/pull/523.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dotmailer/dotmailer-magento2-extension/pull/523#event-1948353101, or mute the thread https://github.com/notifications/unsubscribe-auth/AOMPIzSVEuhxNit1h0M7-TLz-RXDlpVgks5usVCEgaJpZM4Xx1gC .