+1 vote
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 5.3k views
asked Jan 31, 2018 in Magento by Edward121 (260 points)
+1 vote
2 answers 6.1k views
asked Jan 30, 2018 in Frameworks by Doumeki (480 points)
+1 vote
1 answer 323 views
0 votes
3 answers 987 views
0 votes
0 answers 713 views
0 votes
1 answer 844 views