Code Error in WeSupply Toolbox v1.10.0 [/Controller/Cms/Page/View], part of M2 GA Enhanced Ecommerce UA GTM Tracking
Hi There,
Appraising your module : Magento 2 Google Analytics Enhanced Ecommerce UA GTM Tracking
Magento Version : 2.3.5-p1
On compilation of the DI, throws this error message :
Errors during compilation:
WeSupply\Toolbox\Controller\Cms\Page\View
Incompatible argument type: Required type: \Magento\Framework\Controller\Result\ForwardFactory. Actual type: \Magento\Framework\App\RequestInterface; File:
/home/autoglym/public_html/app/code/WeSupply/Toolbox/Controller/Cms/Page/View.php
Total Errors Count:
On code inspection the `__construct` method's call to the parent __construct is malformed. it passes 4 parameters when the parent expects just 2, and they are mis-ordered.
On v1.10.0 I corrected easily with the following modification :
[app\code\WeSupply\Toolbox\Controller\Cms\Page\View.php]
54: - parent::__construct($context, $request, $pageHelper,$resultForwardFactory);
54: + parent::__construct($context, $resultForwardFactory);
EDIT
My bad, my bad, seems I accidentally installed the 2.4 version not the 2.3 version. egg on my face!
-
Official comment
Glad to see you've managed to track down the issue here! Indeed, it looks like this was an extension file version issue. For anyone else that may be experiencing similar errors, the first and foremost step to take is to verify you're using the correct set of files for your Magento version.
Our products currently come with 3 sets of files:
- Magento 2.0.x - 2.2.x
- Magento 2.3.x
- Magento 2.4.x
Using the wrong set of extension files can lead to errors during compilation such as this, so make sure you always check you're using the corresponding set!
Also, as a general rule, assure you're using the latest versions of our products. We release fixes, improvements, and optimizations in every new version, so if you're experiencing an error and are not on the latest version, there's a good chance it'll be fixed if you update to that. The latest versions of our products can always be found under the weltpixel.com account that was used to place the order, in the Downloadable Products section.
Updates are free and last the whole lifetime of the product, regardless of whether or not you're using a paid or a free module, so there's no reason not to download those!
Comment actions
Please sign in to leave a comment.
Comments
1 comment