Marcodebe Posted March 27, 2022 Share Posted March 27, 2022 ciao, se provo a creare un nuovo prodotto o modificare uno esistente mi da errore, cosa potrei provare? versione prestashop 1.7.8.5 versione php:7.3.33 - ho provato a mettere la 7.4.28 ma non cambia niente errore: FatalThrowableError HTTP 500 Internal Server Error Type error: Argument 1 passed to PrestaShopBundle\Model\Product\AdminModelAdapter::__construct() must be an instance of PrestaShop\PrestaShop\Adapter\LegacyContext, instance of Product given, called in /data/vhosts/motomorphosy.com/httpdocs/src/PrestaShopBundle/Controller/Admin/ProductController.php on line 1279 CRITICAL18:13:05phpType error: Argument 1 passed to PrestaShopBundle\Model\Product\AdminModelAdapter::__construct() must be an instance of PrestaShop\PrestaShop\Adapter\LegacyContext, instance of Product given, called in /data/vhosts/motomorphosy.com/httpdocs/src/PrestaShopBundle/Controller/Admin/ProductController.php on line 1279 CRITICAL18:13:06requestUncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: Argument 1 passed to PrestaShopBundle\Model\Product\AdminModelAdapter::__construct() must be an instance of PrestaShop\PrestaShop\Adapter\LegacyContext, instance of Product given, called in /data/vhosts/motomorphosy.com/httpdocs/src/PrestaShopBundle/Controller/Admin/ProductController.php on line 1279" at /data/vhosts/motomorphosy.com/httpdocs/src/PrestaShopBundle/Model/Product/AdminModelAdapter.php line 192 non so neanche cosa potrebbe servirvi per aiutarmi, ho trovato queste info con il debug: in src/PrestaShopBundle/Model/Product/AdminModelAdapter.php (line 192) * @param ShopContext $shopContext * @param TaxRuleDataProvider $taxRuleDataProvider * @param Router $router * @param FloatParser|null $floatParser */ public function __construct( LegacyContext $legacyContext, AdminProductWrapper $adminProductWrapper, Tools $toolsAdapter, ProductDataProvider $productDataProvider, SupplierDataProvider $supplierDataProvider, AdminModelAdapter->__construct(object(Product), object(LegacyContext), object(AdminProductWrapper), object(Tools), object(ProductDataProvider), object(SupplierDataProvider), object(WarehouseDataProvider), object(FeatureDataProvider), object(PackDataProvider), object(Context), object(TaxRuleDataProvider), object(Router))in src/PrestaShopBundle/Controller/Admin/ProductController.php (line 1279) $this->get('prestashop.adapter.data_provider.warehouse'), $this->get('prestashop.adapter.data_provider.feature'), $this->get('prestashop.adapter.data_provider.pack'), $this->get('prestashop.adapter.shop.context'), $this->get('prestashop.adapter.data_provider.tax'), $this->get('router') ); $form = $this->createFormBuilder($modelMapper->getFormData($product)); switch ($step) { case 'step1': $form->add('step1', 'PrestaShopBundle\Form\Admin\Product\ProductInformation'); Link to comment Share on other sites More sharing options...
donywebs Posted April 11, 2023 Share Posted April 11, 2023 On 3/27/2022 at 6:32 PM, Marcodebe said: ciao, se provo a creare un nuovo prodotto o modificare uno esistente mi da errore, cosa potrei provare? versione prestashop 1.7.8.5 versione php:7.3.33 - ho provato a mettere la 7.4.28 ma non cambia niente errore: FatalThrowableError HTTP 500 Internal Server Error Type error: Argument 1 passed to PrestaShopBundle\Model\Product\AdminModelAdapter::__construct() must be an instance of PrestaShop\PrestaShop\Adapter\LegacyContext, instance of Product given, called in /data/vhosts/motomorphosy.com/httpdocs/src/PrestaShopBundle/Controller/Admin/ProductController.php on line 1279 CRITICAL18:13:05phpType error: Argument 1 passed to PrestaShopBundle\Model\Product\AdminModelAdapter::__construct() must be an instance of PrestaShop\PrestaShop\Adapter\LegacyContext, instance of Product given, called in /data/vhosts/motomorphosy.com/httpdocs/src/PrestaShopBundle/Controller/Admin/ProductController.php on line 1279 CRITICAL18:13:06requestUncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: Argument 1 passed to PrestaShopBundle\Model\Product\AdminModelAdapter::__construct() must be an instance of PrestaShop\PrestaShop\Adapter\LegacyContext, instance of Product given, called in /data/vhosts/motomorphosy.com/httpdocs/src/PrestaShopBundle/Controller/Admin/ProductController.php on line 1279" at /data/vhosts/motomorphosy.com/httpdocs/src/PrestaShopBundle/Model/Product/AdminModelAdapter.php line 192 non so neanche cosa potrebbe servirvi per aiutarmi, ho trovato queste info con il debug: in src/PrestaShopBundle/Model/Product/AdminModelAdapter.php (line 192) * @param ShopContext $shopContext * @param TaxRuleDataProvider $taxRuleDataProvider * @param Router $router * @param FloatParser|null $floatParser */ public function __construct( LegacyContext $legacyContext, AdminProductWrapper $adminProductWrapper, Tools $toolsAdapter, ProductDataProvider $productDataProvider, SupplierDataProvider $supplierDataProvider, AdminModelAdapter->__construct(object(Product), object(LegacyContext), object(AdminProductWrapper), object(Tools), object(ProductDataProvider), object(SupplierDataProvider), object(WarehouseDataProvider), object(FeatureDataProvider), object(PackDataProvider), object(Context), object(TaxRuleDataProvider), object(Router))in src/PrestaShopBundle/Controller/Admin/ProductController.php (line 1279) $this->get('prestashop.adapter.data_provider.warehouse'), $this->get('prestashop.adapter.data_provider.feature'), $this->get('prestashop.adapter.data_provider.pack'), $this->get('prestashop.adapter.shop.context'), $this->get('prestashop.adapter.data_provider.tax'), $this->get('router') ); $form = $this->createFormBuilder($modelMapper->getFormData($product)); switch ($step) { case 'step1': $form->add('step1', 'PrestaShopBundle\Form\Admin\Product\ProductInformation'); Hai risolto il problema? come hai fattto io ho problema identico ora... ti ringrazio per il tuo aiuto Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now