Hi everyone,
I have this configuration:
WINDOWS SERVER 2019 with IIS 10
MySQL 8.0.16.0
PHP 7.2.16
PHPMYADMIN 4.9.0.1
Prestashop 1.7.6.0
I performed a new installation and at 23% appear a error message:
1: Template "C:\inetpub\wwwroot\XXXXXX\mails\themes\modern\core\account.html.twig" is not defined.
I specific than before I has Prestashop v1.7.5.2 (with the same versions of MySQL, PHP, PHPMYADMIN) and the installation it's OK.
Thanks in advace for any help!
Hi @fraria76,
Thanks for your report.
I did not manage to reproduce the issue with PS1.7.6.0 stable version.
What is the exact Language/country did you used during the install?
Thanks!
Hi khouloudbelguith,
my installation language is ITALIAN.
I tried both to make a NEW installation Prestashop 1.7.6.0 and UPDATE from 1.7.5.2 but I have problems.
If I make a NEW installation Prestashop 1.7.6.0 at 23% appear a error message: 1: Template "C:\inetpub\wwwroot\XXXXXXmails\themes\modern\core\account.html.twig" is not defined.
If I make a NEW installation Prestashop v1.7.5.2 the installation it's OK, but if I make a UPDATE to 1.7.6.0 appear a error message and If I refresh the page appear: 500 - Internal server error.
On PHPMYADMIN I use these character encoding for the database: utf8_general_ci
Kind regards
Hi khouloudbelguith,
I did a complete new installation test of Prestahop 1.7.6.0 with ENGLISH language: the result is the same.
But now when appear the error at 23%
1: Template "C:\inetpub\wwwroot\XXXXXXmails\themes\modern\core\account.html.twig" is not defined.
I go on directory C:\inetpub\wwwroot\XXXXX\mails\themes and I delete MODERN directory.
The installation completed successfully.
I also send you the print-screen step by step.
Deleting the MODERN directory what does it imply?
Kind regards
@fraria76, thanks for your feedback.
I did not manage to reproduce the issue with PS1.7.6.0 without removing the modern folder.
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!
Hi khouloudbelguith,
I update you
I did a complete new installation test of Prestahop 1.7.6.0 with ITALIAN language and when appear the problem at 23% I remove the MODERN directory and procede with the installation.
At the end of installation I insert in the final path the MODERN directory and everything seems to work properly.
I have “only” these problem on the back office when I click on:
IMPROVE -> PAYMENT -> PAYMENT METHODS
IMPROVE -> INTERNATIONAL -> TAXES
CONFIGURE -> STORE PARAMETERS -> TRAFFIC & SEO
Appear the message: Server error - 500 - Internal server error -There is a problem that does not allow you to view the desired resource.
If I enabling the Debug Mode and these problems do not occur.
Kind regards
@fraria76, Could you please try to clear cache manually by deleting all the folder into var/cache (prod & dev).
Thanks to check and feedback.
@fraria76, thanks for your feedback.
I did not manage to reproduce the issue with PS1.7.6.0 without removing the modern folder.
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!
Could you please try to clear cache manually by deleting all the folder into var/cache (prod & dev).
Thanks to check and feedback.
yes it worked!
@fraria76, thanks for your feedback.
I did not manage to reproduce the issue with PS1.7.6.0 without removing the modern folder.
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!
as soon as I can I send you the PHP error log
@fraria76, so after clearing the cache, the issue is fixed?
Thanks!
@fraria76, so after clearing the cache, the issue is fixed?
Thanks!
Yes, it worked! Thanks!
@fraria76, so can I close the issue?
Thanks!
Hi,
this method (clear cache manually by deleting all the folder into var/cache (prod & dev)) solved the problem only the first time.... now the problem it's still there :-(
@fraria76, when debug mode is enabled => are there any new exceptions displayed?
Thanks!
Hi khouloudbelguith,
I removed the ps_mbo module and can now log in without problem at:
IMPROVE -> PAYMENT -> PAYMENT METHODS
The problem remains with:
IMPROVE -> INTERNATIONAL -> TAXES
CONFIGURE -> STORE PARAMETERS -> TRAFFIC & SEO
Kind regards
@fraria76, thanks for your feedback.
I did not manage to reproduce the issue when the mbo module is installed & debug mode is enabled.
I attached a screen record
https://drive.google.com/file/d/1rTT_GhQ9qMqHy0x1bEAUwtvLpJhSCJxS/view
Could you please try to run those command lines to remove the cache:
rm -fR /Projet_PrestaShop/var/cache/*
php -d memory_limit=-1 ./bin/console cache:clear
php -d memory_limit=-1 ./bin/console cache:clear --env=prod
Thanks!
Hi khouloudbelguith,
do these commands work with Microsoft Windows or only with Linux?
If they work with Windows, where should I enter them?
Kind regards
@fraria76, with windows, you can use the command prompt Cmd: https://en.wikipedia.org/wiki/Command-line_interface#Command_prompt
Thanks!
Hi khouloudbelguith,
even giving the delete cache command the problem remains
Kind regards
P.S.: in PHPMYADMIN I set for the database as Character Encoding "utf8_general_ci". It's correct?
@fraria76, thanks for your feedback.
In my case, This issue doesn't occur.
Ping @sarahdib could you please try to reproduce the issue.
Thanks!
Hi khouloudbelguith
Hi sarahdib
I redid a new Prestashop 1.7.6.0 installation (same Server, PHP, etc...) and I have equal problem:
IMPROVE -> INTERNATIONAL -> TAXES
CONFIGURE -> STORE PARAMETERS -> TRAFFIC & SEO
Appear the message: Server error - 500 - Internal server error -There is a problem that does not allow you to view the desired resource.
If I enabling the Debug Mode these problems do not occur.
Can I send you the file php.ini for a eventual control?
Kind regards
@fraria76, Could you please follow this link: https://github.com/PrestaShop/php-ps-info
phppsinfo file provides an equivalent to the phpinfo() function that reports PrestaShop Requirements information about the PHP/MySQL/Apache environment and offers suggestions for improvement.
Thanks to check and feedback.
Hi khouloudbelguith,
first thank you so much for all the help you are giving me!
Now I have made a VirtualBox virtual machine with my usual configuration:
WINDOWS SERVER 2019
IIS 10
MySQL 8.0.16.0
PHP 7.2.16
PHPMYADMIN 4.9.0.1
Prestashop 1.7.6.0
The result is always the same on the back office when I click on:
IMPROVE -> PAYMENT -> PAYMENT METHODS
IMPROVE -> INTERNATIONAL -> TAXES
CONFIGURE -> STORE PARAMETERS -> TRAFFIC & SEO
But this time does not appear the error "Server error - 500 - Internal server error" but appear a string.
IMPROVE -> PAYMENT -> PAYMENT METHODS
Appear: PHP Warning: Use of undefined constant ADMIN_LEGACY_CONTEXT - assumed 'ADMIN_LEGACY_CONTEXT' (this will throw an Error in a future version of PHP) in C:\inetpub\wwwroot\prestashop\modules\ps_mbo\ps_mbo.php on line 320
line 320 is: if (ADMIN_LEGACY_CONTEXT === true) {
IMPROVE -> INTERNATIONAL -> TAXES
CONFIGURE -> STORE PARAMETERS -> TRAFFIC & SEO
Appear: PHP Notice: Undefined index: _route in C:\inetpub\wwwroot\prestashop\src\PrestaShopBundle\Controller\Admin\CommonController.php on line 121
line 121 is: $routeName = $request->attributes->get('caller_route', $request->attributes->get('caller_parameters', ['_route' => false])['_route']);
I also ran PHP script and I enclose the result (pdf format)
Kind regards
Hello @fraria76
I'm sorry I didn't reproduce.
It's maybe related to your configuration server.
Thank you
Hi @fraria76,
Despite our several trials, we could not reproduce your issue with the provided information.
It seems that your issue is not a PrestaShop's core bug but most likely a server configuration or customization problem.
Thanks!
Hi,
OK thanks immensely for all the help and when I find a solution I warn you.
Kind regards
p.s .: you performed the tests on server Linux or Microsoft ?
@fraria76, in my case, usually I use Server Linux, but in some case, I test with the Microsoft also.
Thanks!
OK thanks, have a nice day!
I delete MODERN directory.
It works ..Thanks for the tip.
Hi khouloudbelguith,
I inform you that I solved following the directions of "Alexandr Kamenev" from the prestashop.com forum
https://www.prestashop.com/forums/topic/997625-back-office-problem-with-prestashop-1760/?tab=comments#comment-3153799
Change line 121 in '/src/PrestaShopBundle/Controller/Admin/CommonController.php' file to:
// $routeName = $request->attributes->get('caller_route', $request->attributes->get('caller_parameters', ['_route' => false])['_route']);
$routeN1 = $request->attributes->get('caller_parameters', ['_route' => false]);
if (!isset($routeN1['_route'])) {
$routeN1['_route'] = false;
}
$routeName = $request->attributes->get('caller_route', $routeN1['_route']);
Now I don't see the mistake again.
Kind regards
@fraria76 your suggestion has been merged into the codebase thanks to @Gamesh in https://github.com/PrestaShop/PrestaShop/pull/15906
hi, I found the same error, during a clean installation, from zero to prestashop
config:
PHP: 7.1.19
Prestashop 1.7.6.1
Hi @fabiorme,
Here's the PR: https://github.com/PrestaShop/PrestaShop/pull/15906 to fix this issue.
Thanks!
This issue is not resolved with the PR https://github.com/PrestaShop/PrestaShop/pull/15906 . Please reopen.
Currently the installation fails on Windows. I tested latest .zip release, cloned source from git, from latest stable tag, from develop branch. All installation attempts fails no matter if installed from web or from cli.
The only solution was to delete the mails\themes\modern
directory as advised here - then the installation completes. This issues needs to be confirmed and fixed asap as it affect all new users.
Hi, I ran into the same problem during a clean installation, from zero.
Prestashop ver.1.7.6.5 on Windows IIS with PHP 7.2
I can confirm that I had the same problem with a clean installation, just today.
Prestashop 1.7.6.5 on Windows 10, running Apache 2.4 and PHP 7.3.
My Apache error log only show those messages during that timeframe:
[Thu Jun 18 14:28:06.422530 2020] [fcgid:warn] [pid 3832:tid 1252] [client 127.0.0.1:62319] mod_fcgid: stderr: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in W:\\htdocs\\myproject\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\UnitOfWork.php on line 2636, referer: http://hds/myproject/install/index.php
[Thu Jun 18 14:28:06.422530 2020] [fcgid:warn] [pid 3832:tid 1252] [client 127.0.0.1:62319] mod_fcgid: stderr: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in W:\\htdocs\\myproject\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\UnitOfWork.php on line 2665, referer: http://hds/myproject/install/index.php
[Thu Jun 18 14:28:10.821769 2020] [fcgid:warn] [pid 3832:tid 1252] [client 127.0.0.1:62319] mod_fcgid: stderr: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in W:\\htdocs\\myproject\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\UnitOfWork.php on line 2636, referer: http://hds/myproject/install/index.php
[Thu Jun 18 14:28:10.821769 2020] [fcgid:warn] [pid 3832:tid 1252] [client 127.0.0.1:62319] mod_fcgid: stderr: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in W:\\htdocs\\myproject\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\UnitOfWork.php on line 2665, referer: http://hds/myproject/install/index.php
Deleting the mails\themes\modern
folder solves the problem. Since I'm not sure how this will impact PS's functionality, I restored it once the installation was finished. Hopefully it will not cause any more bugs...
I can confirm that I had the same problem with a clean installation, just today.
Prestashop 1.7.6.5 on Windows 10, running Apache 2.4 and PHP 7.3.My Apache error log only show those messages during that timeframe:
[Thu Jun 18 14:28:06.422530 2020] [fcgid:warn] [pid 3832:tid 1252] [client 127.0.0.1:62319] mod_fcgid: stderr: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in W:\\htdocs\\myproject\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\UnitOfWork.php on line 2636, referer: http://hds/myproject/install/index.php
[Thu Jun 18 14:28:06.422530 2020] [fcgid:warn] [pid 3832:tid 1252] [client 127.0.0.1:62319] mod_fcgid: stderr: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in W:\\htdocs\\myproject\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\UnitOfWork.php on line 2665, referer: http://hds/myproject/install/index.php
[Thu Jun 18 14:28:10.821769 2020] [fcgid:warn] [pid 3832:tid 1252] [client 127.0.0.1:62319] mod_fcgid: stderr: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in W:\\htdocs\\myproject\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\UnitOfWork.php on line 2636, referer: http://hds/myproject/install/index.php
[Thu Jun 18 14:28:10.821769 2020] [fcgid:warn] [pid 3832:tid 1252] [client 127.0.0.1:62319] mod_fcgid: stderr: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in W:\\htdocs\\myproject\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\UnitOfWork.php on line 2665, referer: http://hds/myproject/install/index.php
Deleting the
mails\themes\modern
folder solves the problem. But I'm not sure how this will impact PS's functionality.
This is not the same issue.
The error messages you have here come from the fact that PrestaShop 1.7.6 does not run with php7.3 . PS 1.7.7 (next version to be released) is compatible with php7.3 but for PS 1.7.6 you must use php7.1 or php7.2
This is not the same issue.
The error messages you have here come from the fact that PrestaShop 1.7.6 does not run with php7.3 . PS 1.7.7 (next version to be released) is compatible with php7.3 but for PS 1.7.6 you must use php7.1 or php7.2
Yes, it is the same issue. Let me clarify:
I only posted the messages visible in my Apache error log to show that _there is nothing else in it_ (for that timeframe). I was not aware that this was related to PHP 7.3 specifically.
__However__, even if I try a clean PS install with PHP 7.2 (same system), the problem remains:
Template "W:\htdocs\myproject\mails\themes\modern\core\account.html.twig" is not defined.
)mails\themes\modern
folder allows the installation to continue.I also think this bug need to be reopened.
If I remember correctly this bug is related with relative paths use in PrestaShop and with one of ZTS or NTS PHP for Windows (not rembeb which one).
This bug should be fully fixed once migrated to Symfony 4.0+ where relative paths for templates are not longer supported.
Same error to me, ..."mails\themes\modern\core\account.html.twig" is not defined."
MODERN folder deletion seems to solve the problem...
A lot of users with this problem ...
hehehe it's a joke ? ;-) it seems to me
Same error to me, ..."mails\themes\modern\core\account.html.twig" is not defined."
MODERN folder deletion seems to solve the problem...A lot of users with this problem ...
hehehe it's a joke ? ;-) it seems to me
Same here. Just deleted and recreated the folders "mails\themes\modern\core" and "mails\themes\modern\modules" after installation.
OS: Windows NT build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
Software: Microsoft-IIS/8.5
PHP: 7.0.0
MySQL: 5.7.12-log
PrestaShop: 1.7.6.8
I think it is https://github.com/PrestaShop/PrestaShop/issues/20709
@despokd and @DiegoStefanon , please describe here your enviroment (OS, PHP version (copy result of php -v
) and PrestaShop version)
Same error for me. Tested on PHP 7.2.x, 7.3.x, 7.4.x. Nothing worked, but
PHP 7.1.1 works !
Hi everybody,
If you have a reproductible issue (= a scenario that we can follow, with detailed settings, requirements, steps-by-steps instructions that can lead us to reproduce the error mentioned) please create a new issue, it will be a lot of easier to work on it. This issue has a long history and we tried many times to reproduce it without success. Reopening it would be a bad idea, because it would produce a long-term issue with multiple different inputs. It would be very ambiguous and hard to work on.
Please open a new issue if you have a reproductible item 😉 it will be a lot easier for all of us.
Also
OS: Windows NT build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
Software: Microsoft-IIS/8.5
PHP: 7.0.0
MySQL: 5.7.12-log
PrestaShop: 1.7.6.8
PrestaShop latest version is not compatible, as far as I know, with Microsoft-IIS.
Some parts of it might be fine, but nothing has been implemented or tested for this platform so I'm quite sure there is no 100% compatibility with Microsoft-IIS.
@matks I think it is easy to reproduce, please retry with the following configuration:
I am very sure it is related with https://github.com/PrestaShop/PrestaShop/issues/20709 which I backtraced to the NTS/TS issue. Please reproduce and look how template paths are passed. As far as I remember, PrestaShop was passing paths in format that is even not supported by never Twig or Symfony libs, I do not remember exactly... But it is an real issue as it prevents PrestaShop to install, can be reproduced and can/must be fixed in PrestaShop.
Hi @mvorisek,
As commented here: https://github.com/PrestaShop/PrestaShop/issues/16736#issuecomment-564922095
it is ok in my case.
This issue is currently closed, can you open a new one with more information about your configuration.
Thanks!
@khouloudbelguith of course not, because I belive it is https://github.com/PrestaShop/PrestaShop/issues/20709 which is open and you was able to reproduce as well. It only needs to be assigned and fixed :)
Most helpful comment
This issue is not resolved with the PR https://github.com/PrestaShop/PrestaShop/pull/15906 . Please reopen.
Currently the installation fails on Windows. I tested latest .zip release, cloned source from git, from latest stable tag, from develop branch. All installation attempts fails no matter if installed from web or from cli.
The only solution was to delete the
mails\themes\modern
directory as advised here - then the installation completes. This issues needs to be confirmed and fixed asap as it affect all new users.