Jump to content
Demuth

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

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)

Share this post


Link to post
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)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

hi i have fixed this by changing database username and password and enabling debug mode to true ..

Share this post


Link to post
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

Share this post


Link to post
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)

Share this post


Link to post
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)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

I am glad you solved your problem.

I think it might've been something small like a wrong configuration. Either way, feel free to ask if any problems arise in the future.

  • Like 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Posted (edited)

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)

Share this post


Link to post
Share on other sites

When changing PHP Versions the cache should be regenerated. Easy way is to rename /var/cache to /var/cache_old on the Server

Share this post


Link to post
Share on other sites

 I have the same probleme..I have php 7.2 ..but still have the same probleme with this error...and can't charge any module in it 

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

Share this post


Link to post
Share on other sites
Posted (edited)
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)

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites
24 minutes ago, gbartosz83 said:

backend works only in dev mode true

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

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
17 hours ago, 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

it didn't help, I have tried few times

also I did "disable all overrides" and "disable external modules" - it did not change anything

Edited by gbartosz83 (see edit history)

Share this post


Link to post
Share on other sites
On 9/3/2020 at 6: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

It works for me! Thanks!

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More