felixRo
felixRo

Reputation: 187

Prestashop 1.7 - error 500 when accessing General Preference or Administration

Everything works fine if I enable debug mode. There is no error shown. When I disable debug mode I get error 500 when I want to access Preferences or Administration. I deleted /var/cache folder, cleared browser and nothing helps. This is happening after I update P1.7.4.2 to P1.7.5.0. The thing is that on localhost works fine only on my server. Both are on PHP5.6 What is wrong with it?

When trying to access eg. Preferences there is only this error showing in /var/logs/prod.log

request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Catchable Fatal Error: Argument 1 passed to PrestaShop\PrestaShop\Core\Search\SearchParameters::__construct() must be an instance of PrestaShopBundle\Entity\Repository\AdminFilterRepository, instance of Doctrine\ORM\EntityRepository given, called in /PRESTA175/var/cache/prod/ContainerUdabyc4/getPrestashop_Core_Admin_SearchParametersService.php on line 8 and defined" at /PRESTA175/src/Core/Search/SearchParameters.php line 50 {"exception":"[object] (Symfony\Component\Debug\Exception\ContextErrorException(code: 0): Catchable Fatal Error: Argument 1 passed to PrestaShop\PrestaShop\Core\Search\SearchParameters::__construct() must be an instance of PrestaShopBundle\Entity\Repository\AdminFilterRepository, instance of Doctrine\ORM\EntityRepository given, called in /PRESTA175/var/cache/prod/ContainerUdabyc4/getPrestashop_Core_Admin_SearchParametersService.php on line 8 and defined at /PRESTA175/src/Core/Search/SearchParameters.php:50)"} []

Upvotes: 0

Views: 2115

Answers (3)

JohnDom
JohnDom

Reputation: 11

I found another solution

Upgrading from 1.7.4.4 to 1.7.5.1 using Cloudways hosting and what suggested felixRo was not enough in my case. First of all I cleared all files in the var/cache/ folder and then:

  • I restarted Apache
  • I restarted Memcached
  • I restarted Nginix
  • I restarted MySQL

Finally I restarted the whole server as well. This did the trick. Hope it helps someone else.

Upvotes: 1

felixRo
felixRo

Reputation: 187

I found the solution:

If you remove the cache folder and clear browser cache and you still have some problem with error 500 in some cases then you need restart the apache on the server. I found out that I have to restart apache every time I do update from 1.7.4.x to 1.7.5.0 (I did several tests). I didn't have this problem on my localhost and I didn't have this problem when only updating from like 1.7.4.2 to 1.7.4.4 (under 1.7.5.0). I don't get it that, because the apache version on the server is the same as on my lh.

Upvotes: 1

Robertino Vasilescu
Robertino Vasilescu

Reputation: 1078

You may try with deleting the PS_ROOT/var/cache/prod/class_index.php and PS_ROO/var/cache/dev/class_index.php.

Upvotes: 0

Related Questions