Jump to content

back office problem with Prestashop 1.7.6.0


Gigi76

Recommended Posts

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

 

2.jpg

1.jpg

Link to comment
Share on other sites

  • 2 weeks later...

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 by Husar (see edit history)
Link to comment
Share on other sites

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 by WisienDot (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

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']);

 

  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
  • 3 weeks later...
On 9/19/2019 at 7: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']);

 

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...