Alex Posted October 27, 2017 Share Posted October 27, 2017 I have done a fresh new installation of a Prestashop 1.7.2.3 and I have a problem with the product pictures. When i add a picture on a product in the back office, it doesn't appear in the front office neither in the back office. However, the picture is uploaded in the file img/p/2/7 I have try to regenerate the pictures, but it doesn't work better. In debug mode, I have this error on the front offcice : ContextErrorException in ImageRetriever.php line 174: Notice: Undefined offset: 0 in ImageRetriever.php line 174 at ErrorHandler->handleError('8', 'Undefined offset: 0', '/var/home/boutiquetest/public_html/src/Adapter/Image/ImageRetriever.php', '174', array('object' => object(Product), 'id_image' => '27', 'type' => 'products', 'getImageURL' => 'getImageLink', 'root' => '/var/home/boutiquetest/public_html/img/p/', 'imageFolderPath' => '/var/home/boutiquetest/public_html/img/p/2/7', 'urls' => array(), 'image_types' => array(), 'extPath' => '/var/home/boutiquetest/public_html/img/p/2/7/fileType', 'ext' => 'jpg', 'mainImagePath' => '/var/home/boutiquetest/public_html/img/p/2/7/27.jpg', 'keys' => array())) in ImageRetriever.php line 174 at ImageRetriever->getImage(object(Product), '27') in ImageRetriever.php line 81 at ImageRetriever->PrestaShop\PrestaShop\Adapter\Image\{closure}(array('cover' => '1', 'id_image' => '27', 'legend' => '', 'position' => '1')) at array_map(object(Closure), array(array('cover' => '1', 'id_image' => '27', 'legend' => '', 'position' => '1'))) in ImageRetriever.php line 90 at ImageRetriever->getProductImages(array('id_product' => '11', 'id_supplier' => '0', 'id_manufacturer' => '0', 'id_category_default' => '2', 'id_shop_default' => '1', 'id_tax_rules_group' => '1', 'on_sale' => '0', 'online_only' => '0', 'ean13' => '', 'isbn' => '', 'upc' => '', 'ecotax' => '0.000000', 'quantity' => '15', 'minimal_quantity' => '1', 'price' => '36', 'wholesale_price' => '0.000000', 'unity' => '', 'unit_price_ratio' => '0.000000', 'additional_shipping_cost' => '0.00', 'reference' => 'R1256', 'supplier_reference' => '', 'location' => '', 'width' => '0.000000', 'height' => '0.000000', 'depth' => '0.000000', 'weight' => '0.000000', 'out_of_stock' => '2', 'quantity_discount' => '0', 'customizable' => '0', 'uploadable_files' => '0', 'text_fields' => '0', 'active' => '1', 'redirect_type' => '404', 'id_type_redirected' => '0', 'available_for_order' => '1', 'available_date' => '0000-00-00', 'show_condition' => '0', 'condition' => 'new', 'show_price' => '1', 'indexed' => '1', 'visibility' => 'both', 'cache_is_pack' => '0', 'cache_has_attachments' => '0', 'is_virtual' => '0', 'cache_default_attribute' => '0', 'date_add' => '2017-10-24 11:41:24', 'date_upd' => '2017-10-26 10:45:22', 'advanced_stock_management' => '0', 'pack_stock_type' => '3', 'state' => '1', 'id_shop' => '1', 'id_product_attribute' => '0', 'product_attribute_minimal_quantity' => null, 'description' => '<p>Mauris non lacus et elit congue faucibus quis quis lacus. Ut eget vestibulum nunc. Curabitur ac varius risus. Pellentesque molestie tellus massa, et venenatis nulla cursus non. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur non elit finibus, lobortis felis a, tincidunt justo. Aliquam porta lorem ut laoreet blandit. In vehicula iaculis elit, vitae mattis urna. Aliquam ac metus sit amet massa faucibus tincidunt. Donec non hendrerit dui.</p> <p>Sed et ante a velit tincidunt mattis eget quis velit.</p>', 'description_short' => '<p>Lorem ipsum dolor sit amet</p>', 'available_now' => '', 'available_later' => '', 'link_rewrite' => 'lorem-ipsum-dolor-sit-amet', 'meta_description' => '', 'meta_keywords' => '', 'meta_title' => '', 'name' => 'Lorem ipsum dolor sit amet', 'id_image' => '11-27', 'legend' => '', 'manufacturer_name' => null, 'category_default' => 'Accueil', 'new' => '1', 'orderprice' => '30.000000', 'allow_oosp' => '0', 'category' => 'accueil', 'category_name' => 'Accueil', 'link' => 'http://boutiquetest.n124.mobi/accueil/11-lorem-ipsum-dolor-sit-amet.html', 'attribute_price' => '0', 'price_tax_exc' => '30', 'price_without_reduction' => '36', 'reduction' => '0', 'specific_prices' => array(), 'quantity_all_versions' => '15', 'features' => array(), 'attachments' => array(), 'virtual' => '0', 'pack' => '0', 'packItems' => array(), 'nopackprice' => '0', 'customization_required' => false, 'rate' => '20', 'tax_name' => 'TVA FR 20%', 'ecotax_rate' => '0', 'unit_price' => '0', 'id_lang' => '1'), object(Language)) in ProductPresenter.php line 96 at ProductPresenter->fillImages(array('id_product' => '11', 'id_supplier' => '0', 'id_manufacturer' => '0', 'id_category_default' => '2', 'id_shop_default' => '1', 'id_tax_rules_group' => '1', 'on_sale' => '0', 'online_only' => '0', 'ean13' => '', 'isbn' => '', 'upc' => '', 'ecotax' => '0.000000', 'quantity' => '15', 'minimal_quantity' => '1', 'price' => '36', 'wholesale_price' => '0.000000', 'unity' => '', 'unit_price_ratio' => '0.000000', 'additional_shipping_cost' => '0.00', 'reference' => 'R1256', 'supplier_reference' => '', 'location' => '', 'width' => '0.000000', 'height' => '0.000000', 'depth' => '0.000000', 'weight' => '0.000000', 'out_of_stock' => '2', 'quantity_discount' => '0', 'customizable' => '0', 'uploadable_files' => '0', 'text_fields' => '0', 'active' => '1', 'redirect_type' => '404', 'id_type_redirected' => '0', 'available_for_order' => '1', 'available_date' => '0000-00-00', 'show_condition' => '0', 'condition' => 'new', 'show_price' => true, 'indexed' => '1', 'visibility' => 'both', 'cache_is_pack' => '0', 'cache_has_attachments' => '0', 'is_virtual' => '0', 'cache_default_attribute' => '0', 'date_add' => '2017-10-24 11:41:24', 'date_upd' => '2017-10-26 10:45:22', 'advanced_stock_management' => '0', 'pack_stock_type' => '3', 'state' => '1', 'id_shop' => '1', 'id_product_attribute' => '0', 'product_attribute_minimal_quantity' => null, 'description' => '<p>Mauris non lacus et elit congue faucibus quis quis lacus. Ut eget vestibulum nunc. Curabitur ac varius risus. Pellentesque molestie tellus massa, et venenatis nulla cursus non. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur non elit finibus, lobortis felis a, tincidunt justo. Aliquam porta lorem ut laoreet blandit. In vehicula iaculis elit, vitae mattis urna. Aliquam ac metus sit amet massa faucibus tincidunt. Donec non hendrerit dui.</p> <p>Sed et ante a velit tincidunt mattis eget quis velit.</p>', 'description_short' => '<p>Lorem ipsum dolor sit amet</p>', 'available_now' => '', 'available_later' => '', 'link_rewrite' => 'lorem-ipsum-dolor-sit-amet', 'meta_description' => '', 'meta_keywords' => '', 'meta_title' => '', 'name' => 'Lorem ipsum dolor sit amet', 'id_image' => '11-27', 'legend' => '', 'manufacturer_name' => null, 'category_default' => 'Accueil', 'new' => '1', 'orderprice' => '30.000000', 'allow_oosp' => '0', 'category' => 'accueil', 'category_name' => 'Accueil', 'link' => 'http://boutiquetest.n124.mobi/accueil/11-lorem-ipsum-dolor-sit-amet.html', 'attribute_price' => '0', 'price_tax_exc' => '30', 'price_without_reduction' => '36', 'reduction' => '0', 'specific_prices' => array(), 'quantity_all_versions' => '15', 'features' => array(), 'attachments' => array(), 'virtual' => '0', 'pack' => '0', 'packItems' => array(), 'nopackprice' => '0', 'customization_required' => false, 'rate' => '20', 'tax_name' => 'TVA FR 20%', 'ecotax_rate' => '0', 'unit_price' => '0', 'id_lang' => '1', 'id' => '11', 'attributes' => array(), 'weight_unit' => 'kg'), object(ProductPresentationSettings), array('id_product' => '11', 'id_supplier' => '0', 'id_manufacturer' => '0', 'id_category_default' => '2', 'id_shop_default' => '1', 'id_tax_rules_group' => '1', 'on_sale' => '0', 'online_only' => '0', 'ean13' => '', 'isbn' => '', 'upc' => '', 'ecotax' => '0.000000', 'quantity' => '15', 'minimal_quantity' => '1', 'price' => '36', 'wholesale_price' => '0.000000', 'unity' => '', 'unit_price_ratio' => '0.000000', 'additional_shipping_cost' => '0.00', 'reference' => 'R1256', 'supplier_reference' => '', 'location' => '', 'width' => '0.000000', 'height' => '0.000000', 'depth' => '0.000000', 'weight' => '0.000000', 'out_of_stock' => '2', 'quantity_discount' => '0', 'customizable' => '0', 'uploadable_files' => '0', 'text_fields' => '0', 'active' => '1', 'redirect_type' => '404', 'id_type_redirected' => '0', 'available_for_order' => '1', 'available_date' => '0000-00-00', 'show_condition' => '0', 'condition' => 'new', 'show_price' => '1', 'indexed' => '1', 'visibility' => 'both', 'cache_is_pack' => '0', 'cache_has_attachments' => '0', 'is_virtual' => '0', 'cache_default_attribute' => '0', 'date_add' => '2017-10-24 11:41:24', 'date_upd' => '2017-10-26 10:45:22', 'advanced_stock_management' => '0', 'pack_stock_type' => '3', 'state' => '1', 'id_shop' => '1', 'id_product_attribute' => '0', 'product_attribute_minimal_quantity' => null, 'description' => '<p>Mauris non lacus et elit congue faucibus quis quis lacus. Ut eget vestibulum nunc. Curabitur ac varius risus. Pellentesque molestie tellus massa, et venenatis nulla cursus non. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur non elit finibus, lobortis felis a, tincidunt justo. Aliquam porta lorem ut laoreet blandit. In vehicula iaculis elit, vitae mattis urna. Aliquam ac metus sit amet massa faucibus tincidunt. Donec non hendrerit dui.</p> <p>Sed et ante a velit tincidunt mattis eget quis velit.</p>', 'description_short' => '<p>Lorem ipsum dolor sit amet</p>', 'available_now' => '', 'available_later' => '', 'link_rewrite' => 'lorem-ipsum-dolor-sit-amet', 'meta_description' => '', 'meta_keywords' => '', 'meta_title' => '', 'name' => 'Lorem ipsum dolor sit amet', 'id_image' => '11-27', 'legend' => '', 'manufacturer_name' => null, 'category_default' => 'Accueil', 'new' => '1', 'orderprice' => '30.000000', 'allow_oosp' => '0', 'category' => 'accueil', 'category_name' => 'Accueil', 'link' => 'http://boutiquetest.n124.mobi/accueil/11-lorem-ipsum-dolor-sit-amet.html', 'attribute_price' => '0', 'price_tax_exc' => '30', 'price_without_reduction' => '36', 'reduction' => '0', 'specific_prices' => array(), 'quantity_all_versions' => '15', 'features' => array(), 'attachments' => array(), 'virtual' => '0', 'pack' => '0', 'packItems' => array(), 'nopackprice' => '0', 'customization_required' => false, 'rate' => '20', 'tax_name' => 'TVA FR 20%', 'ecotax_rate' => '0', 'unit_price' => '0', 'id_lang' => '1'), object(Language)) in ProductPresenter.php line 568 at ProductPresenter->present(object(ProductPresentationSettings), array('id_product' => '11', 'id_supplier' => '0', 'id_manufacturer' => '0', 'id_category_default' => '2', 'id_shop_default' => '1', 'id_tax_rules_group' => '1', 'on_sale' => '0', 'online_only' => '0', 'ean13' => '', 'isbn' => '', 'upc' => '', 'ecotax' => '0.000000', 'quantity' => '15', 'minimal_quantity' => '1', 'price' => '36', 'wholesale_price' => '0.000000', 'unity' => '', 'unit_price_ratio' => '0.000000', 'additional_shipping_cost' => '0.00', 'reference' => 'R1256', 'supplier_reference' => '', 'location' => '', 'width' => '0.000000', 'height' => '0.000000', 'depth' => '0.000000', 'weight' => '0.000000', 'out_of_stock' => '2', 'quantity_discount' => '0', 'customizable' => '0', 'uploadable_files' => '0', 'text_fields' => '0', 'active' => '1', 'redirect_type' => '404', 'id_type_redirected' => '0', 'available_for_order' => '1', 'available_date' => '0000-00-00', 'show_condition' => '0', 'condition' => 'new', 'show_price' => '1', 'indexed' => '1', 'visibility' => 'both', 'cache_is_pack' => '0', 'cache_has_attachments' => '0', 'is_virtual' => '0', 'cache_default_attribute' => '0', 'date_add' => '2017-10-24 11:41:24', 'date_upd' => '2017-10-26 10:45:22', 'advanced_stock_management' => '0', 'pack_stock_type' => '3', 'state' => '1', 'id_shop' => '1', 'id_product_attribute' => '0', 'product_attribute_minimal_quantity' => null, 'description' => '<p>Mauris non lacus et elit congue faucibus quis quis lacus. Ut eget vestibulum nunc. Curabitur ac varius risus. Pellentesque molestie tellus massa, et venenatis nulla cursus non. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur non elit finibus, lobortis felis a, tincidunt justo. Aliquam porta lorem ut laoreet blandit. In vehicula iaculis elit, vitae mattis urna. Aliquam ac metus sit amet massa faucibus tincidunt. Donec non hendrerit dui.</p> <p>Sed et ante a velit tincidunt mattis eget quis velit.</p>', 'description_short' => '<p>Lorem ipsum dolor sit amet</p>', 'available_now' => '', 'available_later' => '', 'link_rewrite' => 'lorem-ipsum-dolor-sit-amet', 'meta_description' => '', 'meta_keywords' => '', 'meta_title' => '', 'name' => 'Lorem ipsum dolor sit amet', 'id_image' => '11-27', 'legend' => '', 'manufacturer_name' => null, 'category_default' => 'Accueil', 'new' => '1', 'orderprice' => '30.000000', 'allow_oosp' => '0', 'category' => 'accueil', 'category_name' => 'Accueil', 'link' => 'http://boutiquetest.n124.mobi/accueil/11-lorem-ipsum-dolor-sit-amet.html', 'attribute_price' => '0', 'price_tax_exc' => '30', 'price_without_reduction' => '36', 'reduction' => '0', 'specific_prices' => array(), 'quantity_all_versions' => '15', 'features' => array(), 'attachments' => array(), 'virtual' => '0', 'pack' => '0', 'packItems' => array(), 'nopackprice' => '0', 'customization_required' => false, 'rate' => '20', 'tax_name' => 'TVA FR 20%', 'ecotax_rate' => '0', 'unit_price' => '0', 'id_lang' => '1'), object(Language)) in ProductListingPresenter.php line 39 at ProductListingPresenter->present(object(ProductPresentationSettings), array('id_product' => '11', 'id_supplier' => '0', 'id_manufacturer' => '0', 'id_category_default' => '2', 'id_shop_default' => '1', 'id_tax_rules_group' => '1', 'on_sale' => '0', 'online_only' => '0', 'ean13' => '', 'isbn' => '', 'upc' => '', 'ecotax' => '0.000000', 'quantity' => '15', 'minimal_quantity' => '1', 'price' => '36', 'wholesale_price' => '0.000000', 'unity' => '', 'unit_price_ratio' => '0.000000', 'additional_shipping_cost' => '0.00', 'reference' => 'R1256', 'supplier_reference' => '', 'location' => '', 'width' => '0.000000', 'height' => '0.000000', 'depth' => '0.000000', 'weight' => '0.000000', 'out_of_stock' => '2', 'quantity_discount' => '0', 'customizable' => '0', 'uploadable_files' => '0', 'text_fields' => '0', 'active' => '1', 'redirect_type' => '404', 'id_type_redirected' => '0', 'available_for_order' => '1', 'available_date' => '0000-00-00', 'show_condition' => '0', 'condition' => 'new', 'show_price' => '1', 'indexed' => '1', 'visibility' => 'both', 'cache_is_pack' => '0', 'cache_has_attachments' => '0', 'is_virtual' => '0', 'cache_default_attribute' => '0', 'date_add' => '2017-10-24 11:41:24', 'date_upd' => '2017-10-26 10:45:22', 'advanced_stock_management' => '0', 'pack_stock_type' => '3', 'state' => '1', 'id_shop' => '1', 'id_product_attribute' => '0', 'product_attribute_minimal_quantity' => null, 'description' => '<p>Mauris non lacus et elit congue faucibus quis quis lacus. Ut eget vestibulum nunc. Curabitur ac varius risus. Pellentesque molestie tellus massa, et venenatis nulla cursus non. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur non elit finibus, lobortis felis a, tincidunt justo. Aliquam porta lorem ut laoreet blandit. In vehicula iaculis elit, vitae mattis urna. Aliquam ac metus sit amet massa faucibus tincidunt. Donec non hendrerit dui.</p> <p>Sed et ante a velit tincidunt mattis eget quis velit.</p>', 'description_short' => '<p>Lorem ipsum dolor sit amet</p>', 'available_now' => '', 'available_later' => '', 'link_rewrite' => 'lorem-ipsum-dolor-sit-amet', 'meta_description' => '', 'meta_keywords' => '', 'meta_title' => '', 'name' => 'Lorem ipsum dolor sit amet', 'id_image' => '11-27', 'legend' => '', 'manufacturer_name' => null, 'category_default' => 'Accueil', 'new' => '1', 'orderprice' => '30.000000', 'allow_oosp' => '0', 'category' => 'accueil', 'category_name' => 'Accueil', 'link' => 'http://boutiquetest.n124.mobi/accueil/11-lorem-ipsum-dolor-sit-amet.html', 'attribute_price' => '0', 'price_tax_exc' => '30', 'price_without_reduction' => '36', 'reduction' => '0', 'specific_prices' => array(), 'quantity_all_versions' => '15', 'features' => array(), 'attachments' => array(), 'virtual' => '0', 'pack' => '0', 'packItems' => array(), 'nopackprice' => '0', 'customization_required' => false, 'rate' => '20', 'tax_name' => 'TVA FR 20%', 'ecotax_rate' => '0', 'unit_price' => '0', 'id_lang' => '1'), object(Language)) in ps_featuredproducts.php line 323 at Ps_FeaturedProducts->getProducts() in ps_featuredproducts.php line 257 at Ps_FeaturedProducts->getWidgetVariables('displayHome', array('cookie' => object(Cookie), 'cart' => object(Cart))) in ps_featuredproducts.php line 243 at Ps_FeaturedProducts->renderWidget('displayHome', array('cookie' => object(Cookie), 'cart' => object(Cart))) in Hook.php line 900 at HookCore::coreRenderWidget(object(Ps_FeaturedProducts), 'displayHome', array('cookie' => object(Cookie), 'cart' => object(Cart))) in Hook.php line 861 at HookCore::exec('displayHome') in IndexController.php line 39 at IndexControllerCore->initContent() in Controller.php line 205 at ControllerCore->run() in Dispatcher.php line 379 at DispatcherCore->dispatch() in index.php line 28 Please, coul you help me to find the problem and to solve it ? Link to comment Share on other sites More sharing options...
thecokeguy Posted August 17, 2018 Share Posted August 17, 2018 Did you ever find a solution to this? Link to comment Share on other sites More sharing options...
sabanmija Posted April 12, 2019 Share Posted April 12, 2019 could someone give a solution to this please same error 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