Jump to content
  • 0

Problem z logowaniem - błąd krytyczny


adam1981

Question

Witam, 

dostaję zgłoszenia od Klientów o występującym błędzie krytycznym na stronie w różnych sytuacjach np przy próbie zalogowania do swojego konta. 

Sprawdzałem logi na serwerze brak błędów, uruchomiłem tryb debugowania i wyświetla mi się strona z błędami

12:16:23
request    Matched route "admin_performance".
Show context
WARNING
12:16:24
translation    Translation not found.
Show context
CRITICAL
12:16:24
php    Uncaught Warning: Declaration of Cart::getPackageShippingCost($id_carrier = NULL, $use_tax = true, ?Country $default_country = NULL, $product_list = NULL, $id_zone = NULL) should be compatible with CartCore::getPackageShippingCost($id_carrier = NULL, $use_tax = true, ?Country $default_country = NULL, $product_list = NULL, $id_zone = NULL, bool $keepOrderPrices = false)
Show context    Show trace
CRITICAL
12:16:24
request    Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Warning: Declaration of Cart::getPackageShippingCost($id_carrier = NULL, $use_tax = true, ?Country $default_country = NULL, $product_list = NULL, $id_zone = NULL) should be compatible with CartCore::getPackageShippingCost($id_carrier = NULL, $use_tax = true, ?Country $default_country = NULL, $product_list = NULL, $id_zone = NULL, bool $keepOrderPrices = false)" at /home/boss/public_html/override/classes/Cart.php line 580
Show context    Show trace

Po tej czynności nie mogłem wyłączyć trybu debugowania, musiałem zmienić wartość na serwerze w pliku. 


Proszę o pomoc w rozwiązaniu problemu. 

Edited by adam1981 (see edit history)
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

w sieci znalazłem takie rozwiązanie

 

image.thumb.png.a2181596f19fbba70045575f22c34153.png

 

To fix this error, edit file

/var/www/vhosts/site.com/httpdocs/override/classes/Cart.php

Find line

1

public function getPackageShippingCost($id_carrier = null, $use_tax = true, Country $default_country = null, $product_list = null, $id_zone = null)

Replace with

1

public function getPackageShippingCost($id_carrier = null, $use_tax = true, Country $default_country = null, $product_list = null, $id_zone = null, $keepOrderPrices = false)

This is because orderide class have improper function definiation, this may be due to some outdated PrestaShop modules.

 

Wszedłem do katalogu odpowiedniego w moim błędzie i jest tam taki zapis, czy to rozwiąże problem ? 

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...