Greetings to all!
I am working on a project in which we need to upgrade the core of Prestashop from version 1.7.2.0 to version 1.7.6.1.
Try using 1-Click Upgrade, but it didn't work. I just did nothing when I clicked on the "Upgrade Now" button.
Perform a manual update.
After the update, when trying to access the "Modules" section, the following error appears (I have activated the debug mode).
"Fatal Throwable Error
Type error: Argument 3 passed to LinkBlockRepository::__construct() must be an instance of PrestaShopBundle\Translation\TranslatorComponent, instance of PrestaShopBundle\Translation\DataCollectorTranslator given, called in /home/fussions/public_html/tienda/modules/ps_linklist/ps_linklist.php on line 65"
This error message is also displayed when accessing International / Translations
So I deduce that it is related to translations. In the manual update, I copied the translation folder from the old to the new prestashop.
Can anybody help me? Here I send a screenshot and more information about the error.
Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 3 passed to LinkBlockRepository::__construct() must be an instance of PrestaShopBundle\Translation\TranslatorComponent, instance of PrestaShopBundle\Translation\DataCollectorTranslator given, called in /home/fussions/public_html/tienda/modules/ps_linklist/ps_linklist.php on line 65
at modules/ps_linklist/src/LinkBlockRepository.php:12 at LinkBlockRepository->__construct(object(DbPDO), object(Shop), object(DataCollectorTranslator)) (modules/ps_linklist/ps_linklist.php:65)
at Ps_Linklist->__construct() at ReflectionClass->newInstance() (src/Core/Foundation/IoC/Container.php:131)
at PrestaShop\PrestaShopCore\Foundation\IoC\Container->makeInstanceFromClassName('ps_linklist', array('ps_linklist' => true)) (src/Core/Foundation/IoC/Container.php:164)
at PrestaShop\PrestaShopCore\Foundation\IoC\Container->doMake('ps_linklist', array('ps_linklist' => true))
(src/Core/Foundation/IoC/Container.php:177)
at PrestaShop\PrestaShopCore\Foundation\IoC\Container->make('ps_linklist') (src/Adapter/ServiceLocator.php:65)
at PrestaShop\PrestaShop\Adapter\ServiceLocator::get('ps_linklist') (classes/module/Module.php:1141)
at ModuleCore::coreLoadModule('ps_linklist')
(classes/module/Module.php:1120)
at ModuleCore::getInstanceByName('ps_linklist') (src/Core/Addon/Module/ModuleRepository.php:480)
at PrestaShop\PrestaShopCore\Addon\Module\ModuleRepository->getModule('ps_linklist', false)
(src/Core/Addon/Module/ModuleRepository.php:570)
at PrestaShop\PrestaShopCore\Addon\Module\ModuleRepository->getModulesOnDisk(false) (src/Core/Addon/Module/ModuleRepository.php:213)
at PrestaShop\PrestaShopCore\Addon\Module\ModuleRepository->getFilteredList(object(AddonListFilter)) (src/PrestaShopBundle/Controller/Admin/Improve/ModuleController.php:116)
at PrestaShopBundle\Controller\Admin\Improve\ModuleController->manageAction() (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, false) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request), 1, false) (admin123/index.php:86)
Thank you!
A detail that I missed. Nor can I see the Catalog of Modules.
Hi @nosoy76,
Could you please try to re-install the ps_linklist module by deleting this module folder after uninstall.
Could you please try to clear the cache manually by deleting all the folder into var/cache (prod & dev).
Thanks to check and feedback.
Hi @nosoy76,
Since we had no news from you for more than 30 days, I'll close this ticket. Feel free to open another one if you can give specific details.
Thanks!
Greetings
Have the same issue as above.
When installing new theme - got this error while i navigate to the modules section or any other admin panel section that is not "Modules" or "Themes".
Tried reinstalling ps_links module with no help.
Type error: Argument 3 passed to LinkBlockRepository::__construct() must be an instance of PrestaShopBundle\Translation\TranslatorComponent, instance of PrestaShopBundle\Translation\DataCollectorTranslator given, called in /somepathtosomedomain/modules/ps_linklist/ps_linklist.php on line 65
Symfony\Component\Debug\Exception\
FatalThrowableError
in modules/ps_linklist/src/LinkBlockRepository.php (line 12)
private $db; private $shop; private $db_prefix; private $translator; public function __construct(Db $db, Shop $shop, Translator $translator) { $this->db = $db; $this->shop = $shop; $this->db_prefix = $db->getPrefix(); $this->translator = $translator;
LinkBlockRepository->__construct(object(DbPDO), object(Shop), object(DataCollectorTranslator))
in modules/ps_linklist/ps_linklist.php (line 65)
$this->ps_versions_compliancy = array('min' => '1.7.1.0', 'max' => _PS_VERSION_); $this->templateFile = 'module:ps_linklist/views/templates/hook/linkblock.tpl'; $this->linkBlockPresenter = new LinkBlockPresenter(new Link(), $this->context->language); $this->linkBlockRepository = new LinkBlockRepository(Db::getInstance(), $this->context->shop, $this->context->getTranslator()); } public function install() { return parent::install()
and so on... :(
Fixed the issue on my side by copying ps_linklist.php from working version into the one after update.
Installing theme changed the contents of ps_linklist.php
Work for me Thanks
Most helpful comment
Fixed the issue on my side by copying ps_linklist.php from working version into the one after update.
Installing theme changed the contents of ps_linklist.php