Carlos Minguell Posted December 16, 2022 Posted December 16, 2022 Hi there, I have updatded to 1.4 this morning. After do it, the frontend looks to works fine (not all... all categories showed as deactivated, I do not know why, but it is easy to activate them again). In the backoffice all seems to work fine, excepting CUSTOMERS and ORDERS: I get a 500 error when I try to enter in orders or customers. I have all modules updated, PHP 7.4. In my server log I can see this kind of error: 2022-12-16 19:14:08 Error 89.131.145.146 500 GET /admin485hmsjqj/index.php?controller=AdminOrders&token=55d174ffa90021e1c671bf99b2a466d3 HTTP/1.0 Anybody knows what is happening here? Many thanks and best regards, Carlos
the.rampage.rado Posted December 16, 2022 Posted December 16, 2022 Hide your admin directory. Turn on debuging and you will see a detailed error log.
Carlos Minguell Posted December 17, 2022 Author Posted December 17, 2022 (edited) Many thanks for your advice! I forgot to hide the directory 😞 This is the error log I get when access to orders or customers: Argument 3 passed to DispatcherCore::createUrl() must be of the type array, int given, called in /var/www/vhosts/XXXXX/classes/Link.php on line 315 file /var/www/vhosts/XXXXX/classes/Dispatcher.php at line 1228 1209: 1210: /** 1211: * Create an url from 1212: * 1213: * @param string $routeId Name of the route 1214: * @param int $idLang 1215: * @param array $params 1216: * @param bool $forceRoutes 1217: * @param string $anchor Optional anchor to add at the end of this url 1218: * @param null $idShop 1219: * 1220: * @return string 1221: * 1222: * @throws PrestaShopException 1223: * @internal param bool $use_routes If false, don't use to create this url 1224: * 1225: * @since 1.0.0 1226: * @version 1.0.0 Initial version 1227: */ 1228: public function createUrl($routeId, $idLang = null, array $params = [], $forceRoutes = false, $anchor = '', $idShop = null) 1229: { 1230: if ($idLang === null) { 1231: $idLang = (int) Context::getContext()->language->id; 1232: } 1233: if ($idShop === null) { 1234: $idShop = (int) Context::getContext()->shop->id; 1235: } 1236: 1237: if (!isset($this->routes[$idShop])) { 1238: $this->loadRoutes($idShop); Edited December 17, 2022 by Carlos Minguell
Carlos Minguell Posted December 17, 2022 Author Posted December 17, 2022 I don't have the necessary knowledge to understand what it means 😞 Any help would be welcome! Many thanks,
datakick Posted December 17, 2022 Posted December 17, 2022 Looks like the same problem as @musicmasterencountered here: The problem will be with some module calling Link::getAdminLink with invalid paramter. I have added new check to the code: https://github.com/thirtybees/thirtybees/commit/125bc3039f5e4d6cb490288e073a751c50e29f9a If the method Link::getAdminLink is called with invalid parameter, system will raise warning instead of error. You can update to bleeding edge, the fix is already there. Note that you still have to fix the module, as in the future this will throw an error again.
Carlos Minguell Posted December 17, 2022 Author Posted December 17, 2022 I'm sorry for delaying my reply, but I'm out of home and I have limited access to Internet. I really apreciate your help! Here you have the stacktrace: 1. classes/Link.php:315 source DispatcherCore->createUrl(arguments) 2. modules/whatsappchat/whatsappchat.php:675 source LinkCore->getAdminLink(arguments) 3. classes/Hook.php:769 source WhatsAppChat->hookBackOfficeHeader(arguments) 4. classes/Hook.php:473 source HookCore::coreCallHook(arguments) 5. classes/Hook.php:288 source HookCore::execWithoutCache(arguments) 6. classes/controller/AdminController.php:3934 source HookCore::exec(arguments) 7. classes/controller/Controller.php:198 source AdminControllerCore->init() 8. classes/Dispatcher.php:861 source ControllerCore->run() 9. admin485hmsjqj/index.php:58 source DispatcherCore->dispatch()
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