Describe the bug
After an update to 1.7.4, whene I click on "calalog de module" I have this error display (using the debug mode)
To Reproduce
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots or screenrecords to help explain your problem.
Additionnal information
PrestaShop version: 1.7.4
PHP version: PHP 5.6.36-1+ubuntu14.04.1+deb.sury.org+1 (cli)
Hi @mikecastrodemaria,
What is the exact version of twig did you use?
It is a twig version issue.
Thanks to check & feedback.
HI, I used twig from PrestaShop 1.7.4 normaly. How see that ?
@khouloudbelguith I find from vendor/twig/twig/lib/Twig/Environment.php
const VERSION = '1.35.3';
const VERSION_ID = 13503;
const MAJOR_VERSION = 1;
const MINOR_VERSION = 35;
const RELEASE_VERSION = 3;
const EXTRA_VERSION = '';
Hi @mikecastrodemaria,
Thanks for your feedback.
It is the same issue reported here: #10786.
It looks like something went wrong with your update and don't have some of the database columns that were added for 1.7.4.
The solution is to add the missing columns to your database schema.
You can find the full schema for 1.7.4.2 here: https://github.com/PrestaShop/PrestaShop/blob/1.7.4.2/install-dev/data/db_structure.sql
Also, you can follow this documentation: https://devdocs.prestashop.com/1.7/basics/keeping-up-to-date/ for more details about to upgrade Prestashop.
Thanks to check & feedback.
I was using the shell way to process the update using the "easy update module" to go to 1.7.4
Any advice to do the diff + update process of the DB without spend hours to play to the game of 7 errors ? Thanks
@khouloudbelguith Any advice ?
@mikecastrodemaria, as I said before, The solution to fix issues is to add the missing columns to your database schema.
Hi @mikecastrodemaria
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!
Hi @khouloudbelguith ,
I have the same issue after upgrading PS 1.7.4.2 to 1.7.4.4
I have compared all DB tables and there are no tables which I am missing. Any idea how to track down the issue? If TWIG is not up to date, then is there a way to update it?
Many thanks for your help!
P.
Hi @philoupin,
Can you please provide us the log of your upgrade? It can be found in the log.txt file, available in
Could you please try to clear cache manually by deleting all the folder into var/cache (prod & dev).
Thanks to check and feedback.
Hi @khouloudbelguith,
thank you very much for your help. I have just sent you the log.txt by mail, let me know if you did not get it. I repeat here again what I wrote for others who might encounter the same problem:
I have tried to install a completely new/clean PS 1.7.4.4 and then tested the newly installed DB with my own upgrdated PS 1.7.4.4 and I go the same error. When I tried to use the clean install PS 1.7.4.4 with my own DB, I got no error. So this leads me to think it is not a DB problem, but rather a file problem somewhere.
I have cleaned the caches var/cache (prod & dev), but the same error.
I actually went back to a previous version of the website, that I still have running on another server. It is version 1.7.4.2 and in fact there I also get the "oops something went wrong" when I click on Admin/Modules/Modules & Services, so I guess the problem was existing even before the update to 1.7.4.4. I believe the initial install of the shop was 1.7.2.2 and then it was upgraded from there over time, but I am not 100% sure, since I am not the original developer.
Thanks,
p.
Hi @mikecastrodemaria,
No, I didn't receive any mail yet.
Did you use any custom module could cause this issue?
Thanks!
Okay, I will reply again to the email notification of your post I received from github. I would prefer not to post the log publicly. It is possible that the problem is caused by a module, however,don't have anything "custom", just official modules.
Hi @philoupin,
You can provide me the log by email.
My address mail: khouloud.[email protected]
Thanks!
Anche io ho lo stesso identico problema, non penso che sia causato da un modulo, però posso mandarti anche io tutti i moduli che ho attivi, ma penso più che altro che sia dovuto all'aggiornamento dalla versione 1.7.4.2 alla 1.7.4.3
@Gionny996, thanks to update your comment in English.
I also have this problem, but it happens to me in the item "buy-sell tools"
@Gionny996, did you made also an upgrade? from which PS version? what is the exact version of the 1-click upgrade did you use?
Thanks!
I have tried to replace some folders of my PS 1.7.4.4 updated installation with the clean new installation of 1.7.4.4 which does not show this error. So far no success. I have replaced these folders:
app
classes
controllers
modules
src
themes
tools
vendor
So I guess the problem (or the solution) lies not in these folders unless it is a combination of things. Can't the error be tracked down with the error message at the top if this thread?
I have updated twice from 1-click upgrade, once on the official website, once again on the trial one. But on both sides it gives me the same error. But I'm interested in solving on the test site, the version is 1.7.4.4.
@philoupin in previous tickets they solved and the error that was in the db.
@Gionny996, thanks to check in your side if you have any missing columns in your Database.
Which columns should I check?
can I send you some screen with all columns?
I will again install a clean 1.7.4.4 DB and diff the structure with my DB. I will post the result here.
@Gionny996 you can find the full schema for 1.7.4.4 here: https://github.com/PrestaShop/PrestaShop/blob/1.7.4.4/install-dev/data/db_structure.sql
Thanks!
Excuse me, now what should I check?
@Gionny996 forget comparing that "by hand" with your installation, you will never find all the differences. I will do a diff here and let you know the result.
Thanks
Hi @mikecastrodemaria,
Database upgrade OK
[2018-11-11 18:24:49] [CLEANING CACHE] File prod removed
[2018-11-11 18:24:53] Warnungen wurden beim Upgrade gefunden.
[2018-11-11 18:24:53] Database upgraded. Now upgrading your Addons modules...
[2018-11-11 18:24:54] Addons modules files have been upgraded.
[2018-11-11 18:24:54] Die Datenbank wurde bereinigt.
In your log file, I found that the upgrade was done successfully.
Hi,
Could you please try to compare the file /Project_folder/src/PrestaShopBundle/Twig/LayoutExtension.php with the original file
Thanks!
@khouloudbelguith
I have compared the DB structure. I have some extra tables which seem to be from modules.
The only true difference is here:
DROP TABLE IF EXISTS `prstshp_carrier_lang`;
CREATE TABLE `prstshp_carrier_lang` (
`id_carrier` int(10) UNSIGNED NOT NULL,
`id_shop` int(11) UNSIGNED NOT NULL DEFAULT '1',
`id_lang` int(10) UNSIGNED NOT NULL,
`delay` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
in my DB it was delay
varchar(128) DEFAULT NULL
I have changed that in the DB, cleared cache and no change.
I will send you the full diff file by email.
@khouloudbelguith Excuse me, now what should I check?
@philoupin, @Gionny996, have you compared the file /Project_folder/src/PrestaShopBundle/Twig/LayoutExtension.php with the original file ?
Thanks!
I have compared /Project_folder/src/PrestaShopBundle/Twig/LayoutExtension.php with the original file there are no differences.
As I wrote above, i have already replaced the whole src/ folder and it made no difference.
I also compared LayoutExtension.php and I did not find any differences
@philoupin, @Gionny996, the mbo
module is installed in your shops? if yes, thanks to remove it, check & feedback.
It could be a problem.
Thanks!
There seems to be no module by than name. "MBO", yes?
@philoupin, the tech name of this module is ps_mbo
.
Thanks!
Nothing like that inside the PS installation
Hi @marionf,
I did not manage to reproduce the issue with PS1.7.4.4 after upgrade from 1.7.4.3 using the 1-click upgrade module.
what do you think? can you try to reproduce the issue?
Thanks!
Hi @marionf and @khouloudbelguith
as I mentioned earlier, I encounter the same error on a leftover installation of this same shop which is on PS 1.7.4.2.
It seems we just didn't notice it before.
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
I have upgrade from 1.7.4.2 to 1.7.4.3 and then was start the problem. After some days i have upgrade from 1.7.4.3 to 1.7.4.4 and the problem is present yet
@khouloudbelguith in the modules folder I do not have any ps_mbo module
I disabled all the modules without any success
@philoupin have you solved?
@Gionny996 I would definitely let you know here, when I solve it :)
My next planned step is to take a brand new installation of PS 1.7.4.4. and one by one replace the folders of my upgraded installation of PS 1.7.4.4 and see at what point I hit the error. Of course I will use my old database (which is running with the upgraded PS 1.7.4.4) also with the new clean install. But I will not get to that today probably.
but the problem is in the Database, right?
Well, if I use my own database with a new clean installation of PS 1.7.4.4 then I don't encounter the problem, the page "Modules&Services" loads without a problem. Maybe you can try the same thing, you are encountering the problem at a different point, right?
I have compared the database structure of a clean install with the structure of my DB and the only difference was in the table "prstshp_carrier_lang" as I described above. I have updated the filed length in my D, but it didn't make the problem go away.
If it is in the database, then I don't understand why the previous posters didn't say where in the database??
Hi,
I checked also an old upgrade from 1.7.3.2 to 1.7.4.2, but I did not manage to reproduce the issue either.
1-Click Upgrade _ 1-Click Upgrade • 1732.webm.zip
Thanks!
@philoupin so the problem is caused from some files
@Gionny996 not possible to say for sure, that it is really in the files. It could be a combination of file and database that produces the error and it could also be that the actual mistake is in the DB, but that it only produces an error when a certain file is present. Somebody here said it was in the DB, but nobody said what it was, so maybe we are in fact having a different issue?
I think using a clean install and step by step replacing the file folders with my upgraded installation is the best way to go forward at this point. Maybe I am lucky and can find out at what point the error occurs. But as I said, probably not today :)
@khouloudbelguith
I can't reproduce either
@khouloudbelguith @marionf @Gionny996
I have a folder called "addons_catalog" inside "admin/themes/new-theme/template/controllers/" of my upgraded installation of PS 1.7.4.4. This folder "addons_catalog" is not present in a new clean install of PS 1.7.4.4. When I delete this folder (it only contains one file "content.tpl") my error goes away, I can access "Modules & Services" without problems. Issue is solved for me.
Despite our several trials, we could not reproduce your issue with the provided information.
@philoupin all right, is solved also for me
I have another problem in the courier section in the Back Office, can I always write here?
@Gionny996, no you need to create another issue.
Thanks!
@philoupin Thank You! Your solution also worked for me.
Most helpful comment
@khouloudbelguith @marionf @Gionny996
I have a folder called "addons_catalog" inside "admin/themes/new-theme/template/controllers/" of my upgraded installation of PS 1.7.4.4. This folder "addons_catalog" is not present in a new clean install of PS 1.7.4.4. When I delete this folder (it only contains one file "content.tpl") my error goes away, I can access "Modules & Services" without problems. Issue is solved for me.