+1 vote
1.8k views
asked in Zend by (260 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 by (480 points)
selected by
 
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 by (260 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 1.8k views
+1 vote
2 answers 2.1k views
+1 vote
1 answer 292 views
0 votes
3 answers 901 views
0 votes
0 answers 638 views
0 votes
1 answer 745 views
...