Jump to content

Uncaught Exception: Expected argument of type "object, array or empty", "string" given


Recommended Posts

Hello, 

I just updated my prestahop installation from 1.7.3 to 1.7.4, using "autoupgrade-v4.0.0-beta.3.zip".
Everything seems to work fine, except from some labels on top of each other in the BackOffice.

When I try to open "preferences -> article" (Backoffice/index.php/configure/shop/product_preferences), I get an error:

"Expected argument of type "object, array or empty", "string" given"

 

I added the stacktrace as file.

 

How can I fix this error?

 

stacktrace.txt

Link to comment
Share on other sites

I updated my prestashop to 1.7.4.1. The error still persists.

 

Stacktrace:

 

Symfony\Component\Form\Exception\UnexpectedTypeException:
Expected argument of type "object, array or empty", "string" given

  at vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php:41
  at Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper->mapDataToForms('In Stock', object(RecursiveIteratorIterator))
     (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:383)
  at Symfony\Component\Form\Form->setData('In Stock')
     (vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php:49)
  at Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper->mapDataToForms(array('allow_ordering_oos' => false, 'stock_management' => true, 'in_stock_label' => 'In Stock', 'oos_allowed_backorders' => 'Product available for orders', 'oos_denied_backorders' => array('Nicht auf Lager'), 'delivery_time' => array(), 'oos_delivery_time' => array(), 'pack_stock_management' => '0'), object(RecursiveIteratorIterator))
     (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:383)
  at Symfony\Component\Form\Form->setData(array('allow_ordering_oos' => false, 'stock_management' => true, 'in_stock_label' => 'In Stock', 'oos_allowed_backorders' => 'Product available for orders', 'oos_denied_backorders' => array('Nicht auf Lager'), 'delivery_time' => array(), 'oos_delivery_time' => array(), 'pack_stock_management' => '0'))
     (vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php:49)
  at Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper->mapDataToForms(array('general' => array('catalog_mode' => false, 'new_days_number' => '1000', 'short_description_limit' => '800', 'quantity_discount' => null, 'force_friendly_url' => false, 'default_status' => false), 'pagination' => array('products_per_page' => '12', 'default_order_by' => '4', 'default_order_way' => '0'), 'page' => array('display_quantities' => true, 'display_last_quantities' => '3', 'display_unavailable_attributes' => true, 'allow_add_variant_to_cart_from_listing' => true, 'attribute_anchor_separator' => '-', 'display_discount_price' => false), 'stock' => array('allow_ordering_oos' => false, 'stock_management' => true, 'in_stock_label' => 'In Stock', 'oos_allowed_backorders' => 'Product available for orders', 'oos_denied_backorders' => array('Nicht auf Lager'), 'delivery_time' => array(), 'oos_delivery_time' => array(), 'pack_stock_management' => '0')), object(RecursiveIteratorIterator))
     (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:383)
  at Symfony\Component\Form\Form->setData(array('general' => array('catalog_mode' => false, 'new_days_number' => '1000', 'short_description_limit' => '800', 'quantity_discount' => null, 'force_friendly_url' => false, 'default_status' => false), 'pagination' => array('products_per_page' => '12', 'default_order_by' => '4', 'default_order_way' => '0'), 'page' => array('display_quantities' => true, 'display_last_quantities' => '3', 'display_unavailable_attributes' => true, 'allow_add_variant_to_cart_from_listing' => true, 'attribute_anchor_separator' => '-', 'display_discount_price' => false), 'stock' => array('allow_ordering_oos' => false, 'stock_management' => true, 'in_stock_label' => 'In Stock', 'oos_allowed_backorders' => 'Product available for orders', 'oos_denied_backorders' => array('Nicht auf Lager'), 'delivery_time' => array(), 'oos_delivery_time' => array(), 'pack_stock_management' => '0')))
     (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:487)
  at Symfony\Component\Form\Form->initialize()
     (vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php:226)
  at Symfony\Component\Form\FormBuilder->getForm()
     (src/Core/Form/FormHandler.php:95)
  at PrestaShop\PrestaShop\Core\Form\FormHandler->getForm()
     (src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ProductPreferencesController.php:66)
  at PrestaShopBundle\Controller\Admin\Configure\ShopParameters\ProductPreferencesController->indexAction(object(Request))
  at call_user_func_array(array(object(ProductPreferencesController), 'indexAction'), array(object(Request)))
     (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)
     (Backoffice/index.php:88)

 

Edited by Flying Dutchman (see edit history)
Link to comment
Share on other sites

Same here, also after updating last friday from 1.7.3 to 1.7.4 by using autoupgrade-v4.0.0 beta.

Everything works smoothly execpt the configure/shop/product_preferences which gives a general 500 error

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 years later...
  • 6 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...