When I go to a product that I created on 1.7.4.4 in the admin area under products -> combination tab it does not load the combinations products. When I try to regenerate the combinations it says "error updating product"
PrestaShop version: 1.7.5.0
PHP version: 7.2
Hi @jimmybsilva,
Thanks for your report.
I did not manage to reproduce the issue with the 1-click upgrade v4.5.1 from PS1.7.4.4 to PS1.7.5.0.
Did you have any errors during the upgrade?
Can you please provide us the log of your upgrade? It can be found in the log.txt file, available in
Thanks!
@jimmybsilva, did you delete your last comment?
Thanks!
i had same issue. After few minutes its gone.
In my prestashop logs there is information about clearing cache by command line.
console.ERROR: Error thrown while running command "doctrine:cache:clear-metadata --flush=1". Message: "Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI." {"exception":"[object] (LogicException(code: 0): Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI. at /var/www/web/prestashop/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php:89)","command":"doctrine:cache:clear-metadata --flush=1","message":"Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI."} []
console.DEBUG: Command "doctrine:cache:clear-metadata --flush=1" exited with code "1" {"command":"doctrine:cache:clear-metadata --flush=1","code":1} []
console.ERROR: Error thrown while running command "doctrine:cache:clear-query --flush=1". Message: "Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI." {"exception":"[object] (LogicException(code: 0): Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI. at var/www/prestashop/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php:89)","command":"doctrine:cache:clear-query --flush=1","message":"Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI."} []
console.DEBUG: Command "doctrine:cache:clear-query --flush=1" exited with code "1" {"command":"doctrine:cache:clear-query --flush=1","code":1} []
Hi @slupostrupek,
Thanks for your comment.
So the issue is fixed in your case?
Did you clear cache from your shop & your browser?
Thanks!
Also reporting this issue - I'm not able to see combitations in Combinations tab and also to save new product with combination after I've added combitation supplier price... @khouloudbelguith any solution for this issue?
I'm getting 400 error saving new product with combinations:
admin*/index.php/sell/catalog/products/62?_token=xhl7VpSC2XZDItdyOWDEuX_hR0dYLQjZNKRxIe4fnM8#tab-step6
Hi @anantaramdas,
I did not manage to reproduce the issue after upgrade from PS1.6.1.23 to PS1.7.5.0 & after an upgrade from PS1.7.4.4 to PS1.7.5.0.
We need to retrieve the PHP error log and the debug mode report in order to find out what's wrong.
Don't you know how to get this information? Please read the following article:
http://build.prestashop.com/howtos/misc/how-to-create-bug-report/
Thanks!
Followin exception I got by enabling debug mode:
Symfony\Component\Debug\Exception\ContextErrorException:
Notice: Undefined offset: 0
at src/Adapter/CombinationDataProvider.php:123
at PrestaShop\PrestaShop\Adapter\CombinationDataProvider->completeCombination(array(), object(Product))
(src/Adapter/CombinationDataProvider.php:108)
at PrestaShop\PrestaShop\Adapter\CombinationDataProvider->getFormCombinations(array(':numbers'), 2)
(src/PrestaShopBundle/Controller/Admin/CombinationController.php:45)
at PrestaShopBundle\Controller\Admin\CombinationController->generateCombinationFormAction(array(':numbers'))
(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)
(admin12765zh1b/index.php:88)
In following line:
Hi @anantaramdas,
Did you use a multishop context?
What is the exact PHP version did you use?
THanks!
No I do not use multishop and my php is 7.2.10
Hi @anantaramdas,
Despite our several trials, I could not reproduce your issue with the provided information.
We are the Holidays season, our developers are not here right now.
I will assign your issue to our developer to reproduce the issue.
Thanks for your patience & your understanding!
@marionf what do you think? could you please try to reproduce the issue?
Thanks!
@khouloudbelguith Do you have any tool to export all data and import it on new installation? I'm not able to add any product now :(
@anantaramdas,
In your file Projet_folder/src/Adapter/CombinationDataProvider.php line 123, could you please add this code line ( to debug your issue, you need to delete it after checking)
print_r($attributesCombinations[0]);
exit;
and provide the exact result when you edit your product with combinations
Thanks!
:) That is obvious however:
@anantaramdas, thanks to try with this
print_r($attributesCombinations);
exit;
Thanks!
Already tried = it is empty arrays - i.e. array():
@khouloudbelguith I have prepeared initial creencast to reproduce this issue on my installation. Hope it will help resolve the issue:
@anantaramdas, Can you check if there is already a 'prod' folder in var/cache, and remove it manually in order to reset the permissions?
Thanks!
What I can see there is:
I removed both (dev and prod) and dev folder recreated after relogin to admin panel. Is this expected behavior?
@anantaramdas, yes, it is normal behavior.
Thanks!
Forgot to say - issue still there...
@anantaramdas, It could be like something went wrong with your update and don't have some of the database columns that were added for 1.7.5.
Can you please check if you have missing columns on your database schema.
https://github.com/PrestaShop/PrestaShop/blob/1.7.5.0/install-dev/upgrade/sql/1.7.5.0.sql
You can find the full schema for 1.7.5.0 here: https://github.com/PrestaShop/PrestaShop/blob/1.7.5.0/install-dev/data/db_structure.sql
Thanks!
I checked https://github.com/PrestaShop/PrestaShop/blob/1.7.5.0/install-dev/upgrade/sql/1.7.5.0.sql and found 2 syntax errors:
After correcting them and reapplying to database all went back normal. Any Christmas candies for finding bugs? 馃槃
Hi @jimmybsilva,
I m glad to solve the issue.
In fact, we manage to reproduce three warnings during the upgrade, here's the PR: https://github.com/PrestaShop/PrestaShop/pull/11814 to solve the issue.
Thanks to check this fix & apply changes on your Database.
Thanks!
Still you did not applied fix on your code in github... why?
@jimmybsilva @marionf ?
This problem seams to happen only in Apple Safari and not with Chrome on Mac
Hi @ossd,
I tried with PS1.7.5.0 after upgrade from PS1.7.4.4 & all the combinations are displayed.
I'm using Operating system Apple
os_version=Mojave
& browser=Safari
& browser_version=12.0
.
Thanks!
Ok, true. An other mac don't have this problem. Sorry.
Hi @ossd,
Ok, thanks for your feedback!
I'm not sure if I understand correctly. What steps do I have to take to solve the problem?
Hi @bartes1987,
As described by @anantaramdas, you need to update your database
1- table PREFIX_product
, change the reference
& supplier_reference from varchar(32)
to varchar(62)
2- table PREFIX_supply_order_receipt_history
, chnage the employee_firstname
& employee_lastname
from varchar(32) to varchar(255).
PS: PREFIX is the prefix of your tables, it could be for example ps.
For more details, you can follow this comment & this one also.
Thanks!
I made all these updates and I'm afraid that the problem still occurs in my case.
@bartes1987, did follow this comment?, did you made changes in all those tables:
ALTER TABLE PREFIX_supply_order_receipt_history
CHANGE employee_firstname
employee_firstname
VARCHAR(255) DEFAULT '';
ALTER TABLE PREFIX_supply_order_receipt_history
CHANGE employee_lastname
employee_lastname
VARCHAR(255) DEFAULT '';
ALTER TABLE PREFIX_order_detail
CHANGE product_supplier_reference
product_supplier_reference varchar(64) DEFAULT NULL;
ALTER TABLE PREFIX_product_attribute
CHANGE product_supplier_reference product_supplier_reference varchar(64) DEFAULT NULL;
ALTER TABLE PREFIX_product
CHANGE reference
reference
varchar(64) DEFAULT NULL;
ALTER TABLE PREFIX_product_lang
CHANGE meta_description
meta_description
varchar(512) DEFAULT NULL, CHANGE meta_keywords
meta_keywords
varchar(255) DEFAULT NULL;
PS: PREFIX is the prefix of your tables, t could be for example ps.
In your Database, for each table, did you check the "Structure" tab?
Yes, I made these changes. I'm attaching the screenshots from my current databse.
@bartes1987, it seems that your issue is different, this issue is currently closed, can you open a new one with more information about your configuration.
Thanks!
@khouloudbelguith Ok, I did it: #12257
This problem seams to happen only in Apple Safari and not with Chrome on Mac
Hi,
same error here, using Mac and Chrome upgrading from 1.7.2 to 1.7.5