Jump to content

["Solved"] HTTP ERROR 500 - Backend / Admin


Demuth

Recommended Posts

Okay, so I 've got around 1200+ views on my original post in danish, but no one has even answered.
So I'll try asking here, hopefully with more luck.

I have been locked out of my backend once again, all I did was disabling the module ps_contactinfo, and now I got this error message: https://pastebin.com/2CAYScbF

Last time I got locked out, I was able to reset the module ps_linklist and everything has worked since then.
So obviously I tried that again, but I cannot get access to anything this time, front end works just fine.. But the shop is useless without a proper backend.

So quick question, how do one fix this ?

 

Original post in danish can be found here: 

 

 

Thank you for reading and hopefully someone can help me sort this one out.

Edited by Demuth
Solved by reinstalling (see edit history)
Link to comment
Share on other sites

So I downgraded the php version to 7.2 got access to some new debug panels, I've never seen before.

So I found this one error I guess is the cause, but I can't decode it.
I hope someone have an idea

Entities Mapping

Class Mapping errors
PrestaShopBundle\Entity\Tab
  • The association PrestaShopBundle\Entity\Tab#tabLangs refers to the owning side field PrestaShopBundle\Entity\TabLang#tab which does not exist.

 

Edit: and now I'm able to find some more information for you:

Serverinformation

Serverinformation Linux #1 SMP Fri Aug 24 08:00:15 UTC 2018 x86_64

Serversoftwarens version: Apache

PHP-version: 7.2.16

Memorylimit: 536870912

Max responsetime: 50

Upload max filesize: 96M

Edited by Demuth
More debug info (see edit history)
Link to comment
Share on other sites

Update: 

So now I have managed to unlock the control panel, I can do everything it seems like.
But.. Only when debug mode is activated, the moment I disable debug mode, I get the HTTP ERROR 500 again, any solution  to this issue ?

  • Like 1
Link to comment
Share on other sites

Sorry for the late answer.

You did correctly by downgrading to PHP7.2 because the newer version is still not recommended by Prestashop. 

As for the error you get when not in debug mode. If it is the same as above, then go to ROOT_FOLDER/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php, search for the following code on lines: 2636, 2665.

continue;

and change it to:

continue 2;

This isn't really a Prestashop bug, but rather a vendor bug.

  • Thanks 1
Link to comment
Share on other sites

Thank you for the response, I have changed those two lines.
The Entities Mapping error is now gone and shows no errors, thank you for that.

But I still can't get access to the backend site, unless I set _PS_MODE_DEV_ to true

In the debug log center I can only seem to find this error under Deprecations: 

Time Channel Message
23:43:46 - Enabling the "sensio_framework_extra.router.annotations" configuration is deprecated since version 5.2. Set it to false and use the "Symfony\Component\Routing\Annotation\Route" annotation from Symfony itself.
[
  "exception" => SilencedErrorContext {#5288 }
]

 

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

I am glad that at least we resolved one bug.

About the _PS_MODE_DEV_, could you please do the following:

  1. Disable debug mode.
  2. Enter BO to get an error.
  3. Locate PHP error log.
  4. Copy and paste the error onto here.

I think that your problem is a quick fix, we just need to find the problem. Meanwhile, I will look into your deprecation warning.

EDIT: You can easily remove sensio deprecation message.

  1. Go to ROOT_FOLDER/app/config/config.yml
  2. Place the following code after Doctrine Configuration (around line ~105)
# Sensio Configuration
sensio_framework_extra:
    router:
        annotations: false

NOTE: PrestaShop 1.7.6.x will most likely solve these issues so before upgrading make a backup.

Edited by OctagonMD
Grammar errors (see edit history)
Link to comment
Share on other sites

Thank you for the reply, I will do that.
Currently my hosting provider doesn't allow me to enable php logging, so I contacted their 2nd level technician in order to enable this.

So I will return with the log as soon as possible.

Link to comment
Share on other sites

  • 2 weeks later...

Turns out the server host, doesn't have a clue how to enable php logs, or at least they won't share it with me, spoke with 6 different people now.

So I lost my patience and reinstalled everything instead.
Everything works just fine now, thank you and sorry I couldn't be of help solving whatever caused the issue.

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

  • 7 months later...

Hi all.

I've the same problem of you.

Symfony send Deprecation "Enabling the "sensio_framework_extra.router.annotations" configuration is deprecated since version 5.2. Set it to false and use the "Symfony\Component\Routing\Annotation\Route"

I disabled all external ps modules and now I'm running in debug mode. How to fix the problem? Help me thank you

Link to comment
Share on other sites

  • 5 months later...
  • 4 weeks later...

I had the same problem. My frontside worked, but the backoffice worked only with debug enabled.

My way to solve this problem:

 - I had the UnitOfWork.php error. I read somewhere the recommendation to downgrade from php 7.3 to 7.2. I did so. No result.

 - I now got the sensio_framework_extra:router message. I got rid of that. Still no result.

 - I downgraded further to php 7.1. Still no result.

 - I used Prestools to empty the cache. Now things worked again.

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

  • 1 month later...
On 24/06/2020 at 15:17, patricia100 said:

 J'ai le même problème..J'ai php 7.2 ..mais j'ai toujours le même problème avec cette erreur ... et je ne peux pas charger de module dedans 

image.thumb.png.f9cb697ea4868f21f03ad06fff4d8d93.pngimage.thumb.png.1e0202cf06b32f144b3f0eec293751fb.pngimage.thumb.png.ac415e6fe8e328bc6706ed24ff7ca604.png

Hello,

I also have the same problem, did you find a solution?

Thanks

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

  • 2 months later...

Hi! I have the same problem my presta is 1.7.6.7
I have upgraded my php to 7.2 and I cleared cache.
Still have those errors, backend works only in dev mode true

PrestaShopBundle\Entity\Tab - The association PrestaShopBundle\Entity\Tab#tabLangs refers to the owning side field PrestaShopBundle\Entity\TabLang#tab which does not exist.

PrestaShopBundle\Entity\TabLang - The mappings PrestaShopBundle\Entity\TabLang#id and PrestaShopBundle\Entity\Tab#tabLangs are inconsistent with each other.

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

  • 3 weeks later...
  • 1 month later...
  • 3 months later...
On 9/3/2020 at 7:24 PM, JBW said:

If it works in debug mode it's a cache issue. Delete /var/cache on the server, it will be regenerated with next page call

Thanks JBW, it works for me too ! By deleting the directory /var/cache my problem is solved. 🙂

Merci beaucoup pour la solution.
J'avais également une page blanche en accédant à la page d'administration de mon site Prestashop v1.7.5.2. Je ne pouvais y accéder qu'en mode debug.

Je devais modifier la ligne define('_PS_MODE_DEV_', true); dans le fichier ROOT/config/defines.inc.php

En mode debug cette anomalie était affichée : The association PrestaShopBundle\Entity\Tab#tabLangs refers to the owning side field PrestaShopBundle\Entity\TabLang#tab which does not exist.

En supprimant le répertoire /var/cache sur le serveur via mon client FTP puis en me reconnectant simplement via l'url du backoffice, le répertoire /var/cache a été recréé.

Mon problème d'accès à la console est enfin résolu.

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

Help please:

Also cannot enter backoffice after trying to update prestashop account module (error message popup).

rename cache\prod to cache\prod_old but still no luck:

I have error:

[01-May-2021 23:50:41 Portugal] PHP Fatal error:  Uncaught Symfony\Component\Yaml\Exception\ParseException: Malformed inline YAML string: { sso_resend_verification_email_url: '%ps_accounts.sso_resend_verification_email_url%', at line 73 (near "- { sso_resend_verification_email_url: '%ps_accounts.sso_resend_verification_email_url%',"). in /home/db/public_html/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php:447
Stack trace:
#0 /home/db/public_html/vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php(67): Symfony\Component\Yaml\Inline::parseMapping('{ sso_resend_ve...', 87, Array)
#1 /home/db/public_html/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php(534): Symfony\Component\Yaml\Inline::parse('{ sso_resend_ve...', false, false, false, Array)
#2 /home/db/public_html/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php(155): Symfony\Component\Yaml\Parser->parseValue('{ sso_resend_ve...', false, false, false, 'sequence')
#3 /home/db/public_html/vendor/symfony/symfony/src/Symfony/Component/Yam in /home/db/public_html/app/bootstrap.php.cache on line 3224

Any help on this?
 

Link to comment
Share on other sites

5 hours ago, JBW said:

These are not used in recent version, you have to look for /var/cache instead

 

It looks like an issue with module ps_accounts. Try to deactivate this module by renaming it's folder

@JBW, Thank you.

Thank you @JBW 

Cannot find var folder.

Renamed ps_accounts and now I have access to the backoffice.

Do not know if this can be related, but I see the items on the webpage, click on the quick view and shows the item and allows to add to cart, but when I click on the item to open the item page also shows http error 500:

This page isn’t working

ja.pt is currently unable to handle this request.

HTTP ERROR 500

Any idea on how to solve this?

Link to comment
Share on other sites

4 minutes ago, JBW said:

Acrivate debug mode to see the error details

I am new on this. I have activated in Advance Parameters: 

Clicket on the item link and shows error:

Whoops, looks like something went wrong.

1/1ContextErrorException in 4da5937defe9318be83bf3d88e49ac50d08261ad.file.displayBlockProduct.tpl.php line 33:Notice: Undefined index: block

in 4da5937defe9318be83bf3d88e49ac50d08261ad.file.displayBlockProduct.tpl.php line 33

at ErrorHandler->handleError('8', 'Undefined index: block', '/home/lg26bnkt/public_html/app/cache/dev/smarty/compile/4d/a5/93/4da5937defe9318be83bf3d88e49ac50d08261ad.file.displayBlockProduct.tpl.php', '33', array('_smarty_tpl' => object(Smarty_Dev_Template))) in 4da5937defe9318be83bf3d88e49ac50d08261ad.file.displayBlockProduct.tpl.php line 33

at content_608ea6936bf7e7_41189894(object(Smarty_Dev_Template)) in smarty_internal_templatebase.php line 188

at Smarty_Internal_TemplateBase->fetch(object(Smarty_Dev_Template), null, null, null, false, true, false) in SmartyDev.php line 60

at Smarty_Dev_Template->fetch() in Module.php line 2242

at ModuleCore->display('/home/lg26bnkt/public_html/modules/blockreassurance/blockreassurance.php', 'views/templates/hook/displayBlockProduct.tpl') in blockreassurance.php line 526

at blockreassurance->renderTemplateInHook('displayBlockProduct.tpl') in blockreassurance.php line 409

at blockreassurance->hookdisplayReassurance(array('smarty' => object(Smarty_Dev_Template), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '1')) in Hook.php line 895

at HookCore::coreCallHook(object(blockreassurance), 'hookdisplayReassurance', array('smarty' => object(Smarty_Dev_Template), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '1')) in Hook.php line 327

at HookCore::callHookOn(object(blockreassurance), 'displayReassurance', array('smarty' => object(Smarty_Dev_Template), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '1')) in Hook.php line 843

at HookCore::exec('displayReassurance', array('smarty' => object(Smarty_Dev_Template), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '1'), null) in smarty.config.inc.php line 168

at smartyHook(array('h' => 'displayReassurance'), object(Smarty_Dev_Template)) in SmartyLazyRegister.php line 83

at SmartyLazyRegister->__call('smartyHook', array(array('h' => 'displayReassurance'), object(Smarty_Dev_Template))) in 6c408ce57128823e7aba5ab063f8d624bfb38c36.file.product.tpl.php line 417

at content_608ea692f25247_01450489(object(Smarty_Dev_Template)) in smarty_internal_templatebase.php line 188

at Smarty_Internal_TemplateBase->fetch('catalog/product.tpl', null, 'layouts/layout-full-width.tpl', object(SmartyDev), false, true, false) in SmartyDev.php line 41

at SmartyDev->fetch('catalog/product.tpl', null, 'layouts/layout-full-width.tpl') in FrontController.php line 671

at FrontControllerCore->smartyOutputContent('catalog/product.tpl') in FrontController.php line 655

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

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

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

Please help.

Link to comment
Share on other sites

5 minutes ago, JBW said:

There is something wromg with module blockreassurance - check if its compatible with your prestashop version. (Temporarily) Deactivate it to avoid the error message.

Deactivated, but still unable to click on the item details and shows errors:

Whoops, looks like something went wrong.

1/1SmartyCompilerException in smarty_internal_templatecompilerbase.php line 28:Syntax error in template "module:paypal/views/templates/shortcut/shortcut-layout.tpl" on line 28 "{include file = "{$moduleDir}/views/templates/_partials/javascript.tpl"}" variable template file names not allow within {block} tags

in smarty_internal_templatecompilerbase.php line 28

at Smarty_Internal_TemplateCompilerBase->trigger_template_error(' variable template file names not allow within {block} tags') in smarty_internal_compile_include.php line 139

at Smarty_Internal_Compile_Include->compile(array(array('file' => '((string)$_smarty_tpl->tpl_vars['moduleDir']->value)."/views/templates/_partials/javascript.tpl"')), object(Smarty_Internal_SmartyTemplateCompiler), array(), null, null) in smarty_internal_templatecompilerbase.php line 580

at Smarty_Internal_TemplateCompilerBase->callTagCompiler('include', array(array('file' => '((string)$_smarty_tpl->tpl_vars['moduleDir']->value)."/views/templates/_partials/javascript.tpl"')), array()) in smarty_internal_templatecompilerbase.php line 349

at Smarty_Internal_TemplateCompilerBase->compileTag('include', array(array('file' => '((string)$_smarty_tpl->tpl_vars['moduleDir']->value)."/views/templates/_partials/javascript.tpl"'))) in smarty_internal_templateparser.php line 3564

at Smarty_Internal_Templateparser->yy_r37() in smarty_internal_templateparser.php line 4392

at Smarty_Internal_Templateparser->yy_reduce('37') in smarty_internal_templateparser.php line 4493

at Smarty_Internal_Templateparser->doParse('3', '}') in smarty_internal_smartytemplatecompiler.php line 118

at Smarty_Internal_SmartyTemplateCompiler->doCompile('<!-- begin /home/lg26bnkt/public_html/modules/paypal/views/templates/shortcut/shortcut-layout.tpl -->{* * 2007-2021 PayPal * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author 2007-2021 PayPal * @copyright PayPal * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * *} <!-- Start shortcut. Module Paypal --> {block name='head'} {include file = "{$moduleDir}/views/templates/_partials/javascript.tpl"} {/block} {block name='content'}{/block} {block name='js'}{/block} {block name='init-button'} <script> function waitPaypalIsLoaded() { if (typeof totPaypalSdkButtons === 'undefined' || typeof Shortcut === 'undefined') { setTimeout(waitPaypalIsLoaded, 200); return; } Shortcut.init(); Shortcut.initButton(); } waitPaypalIsLoaded(); </script> {/block} <!-- End shortcut. Module Paypal --> <!-- end /home/lg26bnkt/public_html/modules/paypal/views/templates/shortcut/shortcut-layout.tpl -->') in smarty_internal_templatecompilerbase.php line 283

at Smarty_Internal_TemplateCompilerBase->compileTemplate(object(Smarty_Dev_Template)) in smarty_internal_template.php line 197

at Smarty_Internal_Template->compileTemplateSource() in smarty_internal_templatebase.php line 155

at Smarty_Internal_TemplateBase->fetch('module:paypal/views/templates/shortcut/shortcut-product.tpl', null, null, object(SmartyDev), false, true, false) in SmartyDev.php line 41

at SmartyDev->fetch('module:paypal/views/templates/shortcut/shortcut-product.tpl') in ShortcutAbstract.php line 65

at ShortcutAbstract->render() in AbstractMethodPaypal.php line 388

at AbstractMethodPaypal->renderExpressCheckoutShortCut('1') in paypal.php line 1120

at PayPal->displayShortcutButton(array('sourcePage' => '1', 'hook' => 'displayReassurance')) in paypal.php line 1014

at PayPal->hookDisplayReassurance(array('smarty' => object(Smarty_Dev_Template), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '1')) in Hook.php line 895

at HookCore::coreCallHook(object(PayPal), 'hookdisplayReassurance', array('smarty' => object(Smarty_Dev_Template), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '1')) in Hook.php line 327

at HookCore::callHookOn(object(PayPal), 'displayReassurance', array('smarty' => object(Smarty_Dev_Template), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '1')) in Hook.php line 843

at HookCore::exec('displayReassurance', array('smarty' => object(Smarty_Dev_Template), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '1'), null) in smarty.config.inc.php line 168

at smartyHook(array('h' => 'displayReassurance'), object(Smarty_Dev_Template)) in SmartyLazyRegister.php line 83

at SmartyLazyRegister->__call('smartyHook', array(array('h' => 'displayReassurance'), object(Smarty_Dev_Template))) in 6c408ce57128823e7aba5ab063f8d624bfb38c36.file.product.tpl.php line 417

at content_608ea692f25247_01450489(object(Smarty_Dev_Template)) in smarty_internal_templatebase.php line 188

at Smarty_Internal_TemplateBase->fetch('catalog/product.tpl', null, 'layouts/layout-full-width.tpl', object(SmartyDev), false, true, false) in SmartyDev.php line 41

at SmartyDev->fetch('catalog/product.tpl', null, 'layouts/layout-full-width.tpl') in FrontController.php line 671

at FrontControllerCore->smartyOutputContent('catalog/product.tpl') in FrontController.php line 655

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

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

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

Link to comment
Share on other sites

10 minutes ago, JBW said:

Again a problem with a module (paypal) and compilation of it's template files. Which prestashop version are you using?

1.7.2.4 It was working OK until I updated (yesterday) the module ps_account.

Earlier this year I have tried to updated via 1clickUpdate, but server does not allow the amount of I/O and did not update.

Is there a way to do it via CPanel / using Softaculous (If I choose install now it will replace the previous version?) - see print screen in attachments.

Update.JPG

Link to comment
Share on other sites

1 minute ago, [email protected] said:

1.7.2.4

Wow thats really really old - newer versions of modules might cause the errors you are experiencing.

Best way to upgrade is 1-click-module. Always do this on a test instance first. This can be done locally as well and then copied back to the live server if tested successfully

Link to comment
Share on other sites

5 minutes ago, JBW said:

Wow thats really really old - newer versions of modules might cause the errors you are experiencing.

Best way to upgrade is 1-click-module. Always do this on a test instance first. This can be done locally as well and then copied back to the live server if tested successfully

tried 1-click-module and does not work. Do not know how to do it locally.

Do you think if I choose install now (in softaculous) it will replace the previous version?

 

Link to comment
Share on other sites

  • 3 weeks later...
On 3/8/2019 at 4:14 AM, Demuth said:

So I downgraded the php version to 7.2 got access to some new debug panels, I've never seen before.

So I found this one error I guess is the cause, but I can't decode it.
I hope someone have an idea

Entities Mapping

Class Mapping errors
PrestaShopBundle\Entity\Tab
  • The association PrestaShopBundle\Entity\Tab#tabLangs refers to the owning side field PrestaShopBundle\Entity\TabLang#tab which does not exist.

 

Edit: and now I'm able to find some more information for you:

Serverinformation

Serverinformation Linux #1 SMP Fri Aug 24 08:00:15 UTC 2018 x86_64

Serversoftwarens version: Apache

PHP-version: 7.2.16

Memorylimit: 536870912

Max responsetime: 50

Upload max filesize: 96M

Uninstall ps_mbo & it will solve the issue.

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