Compile error notice in Magento 2

+1 vote
asked Feb 2 in Zend by Edward121 (240 points)

<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->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?

1 Answer

0 votes
answered Feb 2 by Doumeki (480 points)
selected Feb 2 by Edward121
Best answer

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"

commented Feb 2 by Edward121 (240 points)
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

Related questions

+1 vote
1 answer 352 views
+1 vote
2 answers 305 views
+1 vote
1 answer 261 views
0 votes
3 answers 752 views
0 votes
0 answers 565 views
0 votes
1 answer 658 views