Gigi76 Posted July 29, 2019 Share Posted July 29, 2019 Hello, I have this configuration: WINDOWS SERVER 2019 STANDARD IIS 10 MySQL 8.0.16.0 PHP 7.2.16 PHPMYADMIN 4.9.0.1 Prestashop 1.7.6.0 When I go on the back office and I click on: IMPROVE -> PAYMENT -> PAYMENT METHODS IMPROVE -> INTERNATIONAL -> TAXES CONFIGURE -> STORE PARAMETERS -> TRAFFIC & SEO not appear the correct page but appear a string. with 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) { and with IMPROVE -> INTERNATIONAL -> TAXES with 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']); In the previous installation I had Prestashop v1.7.5.2 (with the same versions of MySQL, PHP, PHPMYADMIN) and the functionality was all OK. I thank each of you for any ideas and suggestions to solve the problem, thanks in advance! Kind regards Link to comment Share on other sites More sharing options...
Bartos_PL Posted August 6, 2019 Share Posted August 6, 2019 I have a similar problem as you PHP Notice: Undefined index: _route in /home/www/domain.com/src/PrestaShopBundle/Controller/Admin/CommonController.php on line 121 Link to comment Share on other sites More sharing options...
Gigi76 Posted August 6, 2019 Author Share Posted August 6, 2019 Hello, unfortunately at the time I have not found a solution. But I noticed that if I set the debug mode the errors do not occur. Link to comment Share on other sites More sharing options...
Husar Posted August 16, 2019 Share Posted August 16, 2019 (edited) Different issue, but same error (customer details page), the solution was to copy dir with content admin/themes/default/template/helpers/list/ to admin/themes/new-theme/template/helpers/. Ps. I'm not programmer, just followed debug message. Edited August 16, 2019 by Husar (see edit history) Link to comment Share on other sites More sharing options...
WisienDot Posted August 19, 2019 Share Posted August 19, 2019 (edited) Hello, I encountered the second issue (Undefined index: _route) while trying to access the orders tab. In my case the problem was caused by missing currency related to existing orders (I removed it as it was no longer required). I strongly suggest to verify all recently changed dependencies Cheers, Dariusz Edited August 19, 2019 by WisienDot (see edit history) Link to comment Share on other sites More sharing options...
Roberto Di Lodovico Posted September 15, 2019 Share Posted September 15, 2019 install php-soap and php-mbstring Link to comment Share on other sites More sharing options...
AlexandrKamenev Posted September 19, 2019 Share Posted September 19, 2019 I solved problem with "Undefined index: _route" as follows. I changed 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']); 1 Link to comment Share on other sites More sharing options...
Gigi76 Posted September 23, 2019 Author Share Posted September 23, 2019 Hello AlexandrKamenev, I followed your suggestion and it worked! Now I don't see the mistake again. Thank you very much for yours valuable help! Kind regards Link to comment Share on other sites More sharing options...
fabiorme Posted October 31, 2019 Share Posted October 31, 2019 hi, I found the same error, during a clean installation, from zero to prestashop. config: PHP: 7.1.19 Prestashop 1.7.6.1 and with the fix described above I could not solve the problem Link to comment Share on other sites More sharing options...
HaCos Posted November 3, 2020 Share Posted November 3, 2020 Any udpates on this? Link to comment Share on other sites More sharing options...
metacreo Posted November 18, 2020 Share Posted November 18, 2020 On 9/19/2019 at 4:07 AM, AlexandrKamenev said: I solved problem with "Undefined index: _route" as follows. I changed 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']); Expand OMG this Undefined index: _route present in all 1.7.x including latest 1.7.6.9 Your fix is right but have too much code ... with php7 you can do just "$var ?? false;" So my line 121 is: $routeName = $request->attributes->get('caller_route', $request->attributes->get('caller_parameters', ['_route' => false])['_route'] ?? false); 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