Compile error notice

For programming and general questions on Zend Framework
Post Reply
edwa2956
Posts: 4
Joined: Tue Jan 30, 2018 9:43 am

Compile error notice

Post by edwa2956 » Fri Feb 02, 2018 4:06 am

After run "di:compile" command in SSH, I got this error in Magento 2:
"Incorrect dependency in class MageArray\Testimonials\Helper\Data in var\www\magento\app\code\MageArray\Testimonials\Helper\Data.php
Magento\Framework\App\Config\ScopeConfigInterface already exists in content object"

Could somebody explain and help me with this?

doum7344
Posts: 2
Joined: Thu Jan 25, 2018 11:22 am

Re: Compile error notice

Post by doum7344 » Fri Feb 02, 2018 5:33 am

This error appears because the parent class that your helper extended have ""Magento\Framework\App\Config\ScopeConfigInterface"" already. In that case, your class extends ""Magento\Framework\View\Element\Template"".
You could remove that variable in your function __construct() in ""MageArray\Testimonials\Helper\Data.php""

edwa2956
Posts: 4
Joined: Tue Jan 30, 2018 9:43 am

Re: Compile error notice

Post by edwa2956 » Fri Feb 02, 2018 5:49 am

It seems great but as advised, I had already asked for some help from those developers from BSSGeek, they gave me a simple instruction and had made some changes accordingly on the site. It works now! But thank you for great support

Post Reply