yireo / Yireo_CheckoutTester2

Checkout test for Magento 2
Open Software License 3.0
82 stars 23 forks source link

Issue when Affirm Finance extension is installed on the Magento system. #21

Open craigfleming opened 2 years ago

craigfleming commented 2 years ago

Exception notice when Magento v2.4.3-p2 and Affirm Finance v3.1.3 are installed with the latest version of yireo/magento2-checkouttester2 and you attempt to preview the checkout success page.

Tried magepal/magento2-preview-checkout-success-page:1.1.0 instead and encountered no issues when previewing the checkout success page with Affirm Finance v3.1.3 installed and enabled.

Here is the exception report:

1 exception(s):
Exception #0 (Exception): Notice: Undefined variable: serializedPixelCode in /var/www/html/vendor/affirm/magento2/view/frontend/templates/pixel/confirm.phtml on line 53

Exception #0 (Exception): Notice: Undefined variable: serializedPixelCode in /var/www/html/vendor/affirm/magento2/view/frontend/templates/pixel/confirm.phtml on line 53
#1 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#2 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#3 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#4 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#5 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php:23]
#6 Magento\Framework\View\TemplateEngine\Php\Interceptor->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#7 Magento\Framework\View\Element\Template->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#8 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/affirm/magento2/Block/Promotion/Pixel/Confirm.php:135]
#9 Astound\Affirm\Block\Promotion\Pixel\Confirm->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1114]
#10 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1118]
#11 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:678]
#12 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#13 Astound\Affirm\Block\Promotion\Pixel\Confirm\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#14 Astound\Affirm\Block\Promotion\Pixel\Confirm\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#15 Astound\Affirm\Block\Promotion\Pixel\Confirm\Interceptor->___callPlugins() called at [generated/code/Astound/Affirm/Block/Promotion/Pixel/Confirm/Interceptor.php:23]
#16 Astound\Affirm\Block\Promotion\Pixel\Confirm\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:578]
#17 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:555]
#18 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#19 Magento\Framework\View\Layout\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#20 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#21 Magento\Framework\View\Layout\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:41]
#22 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#23 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#24 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#25 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#26 Magento\Framework\View\Layout\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#27 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#28 Magento\Framework\View\Layout\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:41]
#29 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#30 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#31 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#32 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#33 Magento\Framework\View\Layout\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#34 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#35 Magento\Framework\View\Layout\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:41]
#36 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#37 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#38 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#39 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#40 Magento\Framework\View\Layout\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#41 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#42 Magento\Framework\View\Layout\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:41]
#43 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#44 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:975]
#45 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#46 Magento\Framework\View\Layout\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#47 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#48 Magento\Framework\View\Layout\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:50]
#49 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:260]
#50 Magento\Framework\View\Result\Page->render() called at [vendor/magento/framework/View/Result/Layout.php:171]
#51 Magento\Framework\View\Result\Layout->renderResult() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#52 Magento\Framework\View\Result\Page\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#53 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#54 Magento\Framework\View\Result\Page\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:23]
#55 Magento\Framework\View\Result\Page\Interceptor->renderResult() called at [vendor/magento/framework/App/Http.php:120]
#56 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:264]
#57 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:29]
jissereitsma commented 2 years ago

Did you make sure to create a bug report for this other module? If I open up the template of that module that is causing this error (please note it is NOT my module causing the error but the other module), I can see that the variable $serializedPixelCode is not defined if the action is different: https://github.com/Affirm/Magento2_Affirm/blob/master/view/frontend/templates/pixel/confirm.phtml#L45 First of all, they have hard-coded their template so it only works if the URL is literally checkout/onepage/success which makes sure third party modules like the Yireo CheckoutTester2 are no longer worker. That's perhaps their business decision, I don't know. But second, their PHTML template is just written with a bug inside it, and you encountered that bug. I assume you therefore already reported this with them?

craigfleming commented 2 years ago

Hi @jissereitsma,

Thanks for the prompt response and for clearing up where the issue originates from.

I will escalate to Affirm and create a bug report with them.

Sorry for wasting your time.

Thanks,

Craig