Jump to content

Another 500 server error but I can't find the thing that causes it.


vincentvanhoogdalem

Recommended Posts

Hello,


Can someone please help me, I can't find the error that causes my website to give an HTTP 500 Server errror.

It is on Cagivaparts.eu

 

I installed the module

LPS Pro Account

v1.2.17 - by Loulou66

B2B Registration - SIRET Verification & Automatic Group

 

I installed it with maintenance mode and everything seemed to work fine.

When changing some translations for the module, it started to show some Error 500.

I cleared the cache and it started to work fine again.

 

But when I checked the website, my header logo was still gone (after the upgrade to the latest version of PrestaShop)

I tried to replace it with the same, but since then I only got the Error 500 and I couldn't get it fixed anymore.

 

Can someone please help me and what do you need from me to help?

 

Before this errors I upgraded to PS 1.7.8.2

Server information: Linux #1 SMP Wed Sep 8 06:07:49 EDT 2021 x86_64

Server software version: Apache

PHP version: 7.2.34

Memory limit: 512M

Max execution time: 30

Upload Max File size: 128M

 

 

 

I placed the webshop under maintenance again, to be able to fix this error.

And in Debug mode it says the following:

[PrestaShopException]

Dispatcher::createUrl() miss required parameter "categories" for route "category_rule"
at line 923 in file classes/Dispatcher.php

918. if (!$data['required']) { 919. continue; 920. } 921. 922. if (!array_key_exists($key, $params)) { 923. throw new PrestaShopException('Dispatcher::createUrl() miss required parameter "' . $key . '" for route "' . $route_id . '"'); 924. } 925. if (isset($this->default_routes[$route_id])) { 926. $query_params[$this->default_routes[$route_id]['keywords'][$key]['param']] = $params[$key]; 927. } 928. }

DispatcherCore->createUrl - [line 475 - classes/Link.php] - [6 Arguments]

LinkCore->getCategoryLink - [line 258 - modules/ps_featuredproducts/ps_featuredproducts.php] - [1 Arguments]

Ps_FeaturedProducts->getWidgetVariables - [line 239 - modules/ps_featuredproducts/ps_featuredproducts.php] - [2 Arguments]

Ps_FeaturedProducts->renderWidget - [line 1007 - classes/Hook.php] - [2 Arguments]

HookCore::coreRenderWidget - [line 954 - classes/Hook.php] - [3 Arguments]

HookCore::exec - [line 39 - controllers/front/IndexController.php] - [1 Arguments]

IndexControllerCore->initContent - [line 306 - classes/controller/Controller.php]

ControllerCore->run - [line 518 - classes/Dispatcher.php]

DispatcherCore->dispatch - [line 28 - index.php]

 

 

 

Who knows a lot about this and can help me out?

 

Kind regards,

Vincent

 

 

error log server 25-12-2021.txt

Link to comment
Share on other sites

Sometimes when I try to open the website under Debug mode it says the following:


Warning: Declaration of Link::getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $idLang = NULL, $idShop = NULL, $ipa = 0, $force_routes = false, $relativeProtocol = false, $addAnchor = false, $extraParams = Array) should be compatible with LinkCore::getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $idLang = NULL, $idShop = NULL, $idProductAttribute = NULL, $force_routes = false, $relativeProtocol = false, $withIdInAnchor = false, $extraParams = Array, bool $addAnchor = true) in /home/deb29003/domains/cagivaparts.eu/public_html/override/classes/Link.php on line 0

Whoops, looks like something went wrong.

(1/1) ContextErrorException

Notice: Undefined index: logo_details

in a7aee29795391de3b194b711f72aaee18c31ee08_2.file.head-jsonld.tpl.php line 33

at content_61c70af8f2d4d1_24950726(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('file:_partials/microdata/head-jsonld.tpl', null, 'classiclayouts/layout-full-width.tpl', 0, 31536000, array(), 0, false)in 2c97602de6f24c011330c3393b11422308deb1f6_2.file.head.tpl.php line 169

at Block_11746287561c70af8f06802_61286425->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248

at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_11746287561c70af8f06802_61286425), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184

at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_11746287561c70af8f06802_61286425))in smarty_internal_runtime_inheritance.php line 156

at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_11746287561c70af8f06802_61286425', 'head_microdata', 4)in 2c97602de6f24c011330c3393b11422308deb1f6_2.file.head.tpl.php line 291

at Block_14069560561c70af8ef9a67_75377678->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248

at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_14069560561c70af8ef9a67_75377678), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184

at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_14069560561c70af8ef9a67_75377678))in smarty_internal_runtime_inheritance.php line 156

at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_14069560561c70af8ef9a67_75377678', 'head_seo')in 2c97602de6f24c011330c3393b11422308deb1f6_2.file.head.tpl.php line 39

at content_61c70af8f15ae2_44230267(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('file:_partials/head.tpl', null, 'classiclayouts/layout-full-width.tpl', 0, 31536000, array(), 0, false)in a243f3929c065803d1f3fe3622881595bfe99009_2.file.layout-both-columns.tpl.php line 139

at Block_43209181961c70af8ec4510_83792564->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248

at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_43209181961c70af8ec4510_83792564), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184

at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_43209181961c70af8ec4510_83792564))in smarty_internal_runtime_inheritance.php line 156

at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_43209181961c70af8ec4510_83792564', 'head')in a243f3929c065803d1f3fe3622881595bfe99009_2.file.layout-both-columns.tpl.php line 45

at content_61c70af8edaf95_80536718(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('layouts/layout-both-columns.tpl', null, 'classiclayouts/layout-full-width.tpl', 0, 31536000, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125

at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-both-columns.tpl')in 084b2e308674b1b5ad77fde4a60402e8501dca47_2.file.layout-full-width.tpl.php line 42

at content_61c70af8ebe220_38556505(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('layouts/layout-full-width.tpl', null, 'classiclayouts/layout-full-width.tpl', 0, 31536000, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125

at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-full-width.tpl')in cacdbd375f13e3b86fffa0cf44799841cbd93fdb_2.file.page.tpl.php line 33

at content_61c70af8eb2607_78415613(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('page.tpl', null, 'classiclayouts/layout-full-width.tpl', 0, 31536000, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125

at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'page.tpl')in 963ad0f8e2548cb7bd7966ec8755e1755d553342_2.file.index.tpl.php line 33

at content_61c70af8ea19d3_54486194(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render(false, 0)in smarty_internal_templatebase.php line 232

at Smarty_Internal_TemplateBase->_execute(object(SmartyDevTemplate), null, 'classiclayouts/layout-full-width.tpl', null, 0)in smarty_internal_templatebase.php line 116

at Smarty_Internal_TemplateBase->fetch('index.tpl', null, 'classiclayouts/layout-full-width.tpl', null, false, true, false)in SmartyDev.php line 40

at SmartyDev->fetch('index.tpl', null, 'classiclayouts/layout-full-width.tpl')in FrontController.php line 727

at FrontControllerCore->smartyOutputContent('index.tpl')in FrontController.php line 709

at FrontControllerCore->display()in Controller.php line 326

at ControllerCore->run()in Dispatcher.php line 518

at DispatcherCore->dispatch()in index.php line 28a

 

 

one of the first lines says: Logo Details. Does that mean the error is only caused by my header logo???

Link to comment
Share on other sites

2 hours ago, vincentvanhoogdalem said:

placed the webshop under maintenance again, to be able to fix this error.

And in Debug mode it says the following:

[PrestaShopException]

Dispatcher::createUrl() miss required parameter "categories" for route "category_rule"
at line 923 in file classes/Dispatcher.php

918. if (!$data['required']) { 919. continue; 920. } 921. 922. if (!array_key_exists($key, $params)) { 923. throw new PrestaShopException('Dispatcher::createUrl() miss required parameter "' . $key . '" for route "' . $route_id . '"'); 924. } 925. if (isset($this->default_routes[$route_id])) { 926. $query_params[$this->default_routes[$route_id]['keywords'][$key]['param']] = $params[$key]; 927. } 928. }

DispatcherCore->createUrl - [line 475 - classes/Link.php] - [6 Arguments]

LinkCore->getCategoryLink - [line 258 - modules/ps_featuredproducts/ps_featuredproducts.php] - [1 Arguments]

Ps_FeaturedProducts->getWidgetVariables - [line 239 - modules/ps_featuredproducts/ps_featuredproducts.php] - [2 Arguments]

Ps_FeaturedProducts->renderWidget - [line 1007 - classes/Hook.php] - [2 Arguments]

HookCore::coreRenderWidget - [line 954 - classes/Hook.php] - [3 Arguments]

HookCore::exec - [line 39 - controllers/front/IndexController.php] - [1 Arguments]

IndexControllerCore->initContent - [line 306 - classes/controller/Controller.php]

ControllerCore->run - [line 518 - classes/Dispatcher.php]

DispatcherCore->dispatch - [line 28 - index.php]

 

This error is due to the "Featured products" module. Disable it for now and that error should go away.

Link to comment
Share on other sites

1 hour ago, vincentvanhoogdalem said:

Warning: Declaration of Link::getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $idLang = NULL, $idShop = NULL, $ipa = 0, $force_routes = false, $relativeProtocol = false, $addAnchor = false, $extraParams = Array) should be compatible with LinkCore::getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $idLang = NULL, $idShop = NULL, $idProductAttribute = NULL, $force_routes = false, $relativeProtocol = false, $withIdInAnchor = false, $extraParams = Array, bool $addAnchor = true) in /home/deb29003/domains/cagivaparts.eu/public_html/override/classes/Link.php on line 0

You are overriding the Link class in /override/classes/Link.php but the declaration is not compatible with the core class it inherits. What are your changes in the override? If you don't need them you could rename/remove that file and this warning should go away. 

 

1 hour ago, vincentvanhoogdalem said:

Notice: Undefined index: logo_details

 

1 hour ago, vincentvanhoogdalem said:

at Smarty_Internal_Template->_subTemplateRender('file:_partials/microdata/head-jsonld.tpl', null, 'classiclayouts/layout-full-width.tpl', 0, 31536000, array(), 0, false)in 2c97602de6f24c011330c3393b11422308deb1f6_2.file.head.tpl.php line 169

Apparently your smarty variable {$shop.logo_details} in your theme file /templates/_partials/microdata/head-jsonId.tpl is undefined (no controller is not setting that variable anywhere). Seems like something in your setup is outdated or improperly overwritten. That variable is set in /classes/controller/FrontController.php in line 1665:

$shop = [
            'id' => $this->context->shop->id,
            'name' => Configuration::get('PS_SHOP_NAME'),
            'email' => Configuration::get('PS_SHOP_EMAIL'),
            'registration_number' => Configuration::get('PS_SHOP_DETAILS'),

            'long' => Configuration::get('PS_STORES_CENTER_LONG'),
            'lat' => Configuration::get('PS_STORES_CENTER_LAT'),

            'logo' => Configuration::hasKey('PS_LOGO') ? $psImageUrl . Configuration::get('PS_LOGO') : '',
            'logo_details' => $this->getShopLogo(),
            'stores_icon' => Configuration::hasKey('PS_STORES_ICON') ? $psImageUrl . Configuration::get('PS_STORES_ICON') : '',
            'favicon' => Configuration::hasKey('PS_FAVICON') ? $psImageUrl . Configuration::get('PS_FAVICON') : '',
            'favicon_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'),

            'address' => [
                'formatted' => AddressFormat::generateAddress($address, [], '<br>'),
                'address1' => $address->address1,
                'address2' => $address->address2,
                'postcode' => $address->postcode,
                'city' => $address->city,
                'state' => (new State($address->id_state))->name,
                'country' => (new Country($address->id_country))->name[$this->context->language->id],
            ],
            'phone' => Configuration::get('PS_SHOP_PHONE'),
            'fax' => Configuration::get('PS_SHOP_FAX'),
        ];

Do you also have an override in /override/classes/controller/FrontController.php ? 

Link to comment
Share on other sites

I disabled the featured products, but the error 500 stayed there.

Today I will edit the other things you mentioned.

 

I don't know anything about overriding, so I'm not sure what that does.

I will rename Link.php

 

So for the FrontController I have to replace what is in line 1665 with what you put above?

 

I don't know if I have an override in FrontController :):(

 

Kind regards,
Vincent

Link to comment
Share on other sites

I re-enabled, disabled and re-enabled the featured products again.

And I disabled All-in-one SEO pro and now the error is gone.

 

So I think All-In-One SEO pro was the thing that caused it.

Is this fixable or do I have to ask the maker of the module?

 

At the moment I don't see an error 500 anymore when I open my website cagivaparts.eu

 

Kind regards,

Vincent

 

Link to comment
Share on other sites

3 hours ago, vincentvanhoogdalem said:

So I think All-In-One SEO pro was the thing that caused it.

Is this fixable or do I have to ask the maker of the module?

Yes, apparently that module created some overrides (for FrontController, among others) which were causing your problems. Featured products module is using a function that was being overwritten, thus also producing errors. 

You should contact the module developer and ask for support.

  • Like 1
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...