Jump to content
prestashopansiar

500 Internal Server Error" after upgrade to PS 1.7.6.0

Recommended Posts

I upgraded from version 1.7.5.2 to 1.76 with the updater 1-clickupdate, it seemed that everything was fine, but when trying to enter the back office I get an error 500, with FTP I modified to show me the error and tell me this, if someone understands, thank you

 

1/1) PrestaShopDatabaseException

Table 'ddb126270.ps_currency_lang' doesn't exist<br /><br /><pre>SELECT *
FROM `ps_currency_lang`
WHERE `id_currency` = 2</pre>

in Db.php line 769

at DbCore->displayError('SELECT * FROM `ps_currency_lang` WHERE `id_currency` = 2')in Db.php line 385

at DbCore->query('SELECT * FROM `ps_currency_lang` WHERE `id_currency` = 2')in Db.php line 613

at DbCore->executeS('SELECT * FROM `ps_currency_lang` WHERE `id_currency` = 2')in EntityMapper.php line 82

at EntityMapper->load('2', null, object(Currency), array('table' => 'currency', 'primary' => 'id_currency', 'multilang' => true, 'fields' => array('iso_code' =>array('type' => 3, 'validate' => 'isLanguageIsoCode', 'required' => true, 'size' => 3), 'numeric_iso_code' => array('type' => 3, 'validate' => 'isNumericIsoCode', 'size' => 3), 'precision' => array('type' => 1, 'validate' => 'isInt'), 'conversion_rate' => array('type' => 4, 'validate' => 'isUnsignedFloat', 'required' => true, 'shop' => true), 'deleted' => array('type' => 2, 'validate' => 'isBool'), 'active' => array('type' => 2, 'validate' => 'isBool'), 'name' => array('type' => 3, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), 'symbol' => array('type' => 3, 'lang' => true, 'size' => 255)), 'classname' => 'Currency', 'associations' => array('l' => array('type' => 2, 'field' => 'id_currency', 'foreign_field' => 'id_currency'))), 1, true)in ObjectModel.php line 264

at ObjectModelCore->__construct('2', null, null)in Currency.php line 177

at CurrencyCore->__construct('2')in AdminController.php line 2950

at AdminControllerCore->initShopContext()in AdminController.php line 535

at AdminControllerCore->__construct()in LegacyContext.php line 85

at LegacyContext->getContext()in UserLocaleListener.php line 39

at UserLocaleListener->__construct(object(LegacyContext))in appDevDebugProjectContainer.php line 2381

at appDevDebugProjectContainer->getPrestashop_UserLocale_ListenerService()in appDevDebugProjectContainer.php line 2868

at appDevDebugProjectContainer->ContainerSjryhgz\{closure}()in EventDispatcher.php line 229

at EventDispatcher->sortListeners('kernel.request')in EventDispatcher.php line 61

at EventDispatcher->getListeners('kernel.request')in ContainerAwareEventDispatcher.php line 128

at ContainerAwareEventDispatcher->getListeners('kernel.request')in TraceableEventDispatcher.php line 262

at TraceableEventDispatcher->preProcess('kernel.request')in TraceableEventDispatcher.php line 137

at TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent))in HttpKernel.php line 127

at HttpKernel->handleRaw(object(Request), 1)in HttpKernel.php line 68

at HttpKernel->handle(object(Request), 1, false)in Kernel.php line 200

at Kernel->handle(object(Request), 1, false)in index.php line 86

Share this post


Link to post
Share on other sites

Check manually with phpmyadmin if the table ps_currency_lang does exist. If not, than the upgrade failed. In  this case it is better to make a rollback, perhaps also other things failed during upgrade process. This option you will find directly on 1-click-upgrade module settings.

If you don't want or can't make a rollback, cause there are new data added to database in the meantime (new orders, customers), than you can try to add this table manually by SQL query.

If you cannot access your back-office check also for other possible server errors on server error log files. Try to access back-office with cookie sessions and cache deleted on your browser before. If still not possible, so the best is to ask your provider to play back  a back-up of your database and FTP back to your webspace before you made the upgrade.

  • Like 1

Share this post


Link to post
Share on other sites

If this table is available than some other things went wrong and/or is broken. The best is to make a rollback at any way. If you cannot access the back-office via dashboard, so ask your provider to play a back-up of DB and FTP before you upgraded your shop to your webspace.

Share this post


Link to post
Share on other sites

If your provider does not have any back-up of your webspace, than you can use the one Prestashop made (rollback). You will find FTP and DB as a zip file on your FTP at folder

/youradmin/autoupgrade/backup. Unzip it and upload FTP and database again to your webspace.

Share this post


Link to post
Share on other sites

Hi,

I have this configuration:

  • WINDOWS SERVER 2019 with IIS 10
  • MySQL 8.0.16.0
  • PHP 7.2.16
  • PHPMYADMIN 4.9.0.1
  • Prestashop 1.7.6.0   /   1.7.5.2

I tried both to make a NEW installation Prestashop 1.7.6.0 and UPDATE from 1.7.5.2 but I have problems.

If I make a NEW installation Prestashop 1.7.6.0 at 23% appear a error message:    1: Template "C:\inetpub\wwwroot\XXXXXX\mails\themes\modern\core\account.html.twig" is not defined.

If I make a NEW installation Prestashop v1.7.5.2 the installation it's OK, but if I make a UPDATE to 1.7.6.0 appear a error message and If I refresh the page appear:   500 - Internal server error.

Thanks in advace for any help!

error.jpg

Share this post


Link to post
Share on other sites

Hello there. Same error here (the same as prestashopansiar) and same case updating from 1.7.5.2 to 1.7.6.0 too

In my case I was able to rollback to 1.7.5.2 in the 1-click module page (because I didn't close the tab after the update) BUT I can confirm that i dont have "'agrovice_84.agro_currency_lang" table (before and after the update)

The last lines of the log in the 1-click update

Cita

Copied /vendor/twig/twig/src/Util/DeprecationCollector.php.Copied /vendor/twig/twig/src/Util/TemplateDirIterator.php.Directory /webservice already exists.Copied /webservice/dispatcher.php.Copied /webservice/index.php.[SKIP] directory "/app/cache/" does not exist and cannot be emptied.[CLEANING CACHE] File prod removed[INTERNAL] /var/www/vhosts/agrovicenc.com/httpdocs/vendor/composer/autoload_real.php line 61 - require(/var/www/vhosts/agrovicenc.com/httpdocs/vendor/composer/../icanboogie/common/bootstrap.php): failed to open stream: No such file or directory[INTERNAL] /var/www/vhosts/agrovicenc.com/httpdocs/vendor/composer/autoload_real.php line 61 - require(/var/www/vhosts/agrovicenc.com/httpdocs/vendor/composer/../icanboogie/common/lib/helpers.php): failed to open stream: No such file or directoryMigrating old setting file...parameters file already exists!Finished...

My errors in the 1-click update

Cita

[INTERNAL] /var/www/vhosts/agrovicenc.com/httpdocs/src/PrestaShopBundle/PrestaShopBundle.php line 64 - Error: Class 'PrestaShopBundle\DependencyInjection\Compiler\OverrideTwigServiceCompilerPass' not found #0 /var/www/vhosts/agrovicenc.com/httpdocs/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(797): PrestaShopBundle\PrestaShopBundle->build(Object(Symfony\Component\DependencyInjection\ContainerBuilder)) #1 /var/www/vhosts/agrovicenc.com/httpdocs/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(768): Symfony\Component\HttpKernel\Kernel->prepareContainer(Object(Symfony\Component\DependencyInjection\ContainerBuilder)) #2 /var/www/vhosts/agrovicenc.com/httpdocs/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(636): Symfony\Component\HttpKernel\Kernel->buildContainer() #3 /var/www/vhosts/agrovicenc.com/httpdocs/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(135): Symfony\Component\HttpKernel\Kernel->initializeContainer() #4 /var/www/vhosts/agrovicenc.com/httpdocs/modules/autoupgrade/classes/UpgradeTools/SymfonyAdapter.php(74): Symfony\Component\HttpKernel\Kernel->boot() #5 /var/www/vhosts/agrovicenc.com/httpdocs/modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php(50): PrestaShop\Module\AutoUpgrade\UpgradeTools\SymfonyAdapter->initAppKernel() #6 /var/www/vhosts/agrovicenc.com/httpdocs/modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php(85): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader17->initConstants() #7 /var/www/vhosts/agrovicenc.com/httpdocs/modules/autoupgrade/classes/TaskRunner/Upgrade/UpgradeDb.php(41): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader->doUpgrade() #8 /var/www/vhosts/agrovicenc.com/httpdocs/admin829imsye4/autoupgrade/ajax-upgradetab.php(53): PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade\UpgradeDb->run() #9 {main}

Error 500 with debug mode on to see the error:

Cita

 

(1/1) PrestaShopDatabaseException

Table 'agrovice_84.agro_currency_lang' doesn't exist<br /><br /><pre>SELECT *
FROM `agro_currency_lang`
WHERE `id_currency` = 1</pre>

in Db.php line 769

at DbCore->displayError('SELECT * FROM `agro_currency_lang` WHERE `id_currency` = 1')in Db.php line 385

at DbCore->query('SELECT * FROM `agro_currency_lang` WHERE `id_currency` = 1')in Db.php line 613

at DbCore->executeS('SELECT * FROM `agro_currency_lang` WHERE `id_currency` = 1')in EntityMapper.php line 82

at EntityMapper->load('1', null, object(Currency), array('table' => 'currency', 'primary' => 'id_currency', 'multilang' => true, 'fields' => array('iso_code' =>array('type' => 3, 'validate' => 'isLanguageIsoCode', 'required' => true, 'size' => 3), 'numeric_iso_code' => array('type' => 3, 'validate' => 'isNumericIsoCode', 'size' => 3), 'precision' => array('type' => 1, 'validate' => 'isInt'), 'conversion_rate' => array('type' => 4, 'validate' => 'isUnsignedFloat', 'required' => true, 'shop' => true), 'deleted' => array('type' => 2, 'validate' => 'isBool'), 'active' => array('type' => 2, 'validate' => 'isBool'), 'name' => array('type' => 3, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), 'symbol' => array('type' => 3, 'lang' => true, 'size' => 255)), 'classname' => 'Currency', 'associations' => array('l' => array('type' => 2, 'field' => 'id_currency', 'foreign_field' => 'id_currency'))), 1, true)in ObjectModel.php line 264

at ObjectModelCore->__construct('1', null, null)in Currency.php line 177

at CurrencyCore->__construct('1')in AdminController.php line 2950

at AdminControllerCore->initShopContext()in AdminController.php line 535

at AdminControllerCore->__construct()in LegacyContext.php line 85

at LegacyContext->getContext()in UserLocaleListener.php line 39

at UserLocaleListener->__construct(object(LegacyContext))in appDevDebugProjectContainer.php line 2381

at appDevDebugProjectContainer->getPrestashop_UserLocale_ListenerService()in appDevDebugProjectContainer.php line 2868

at appDevDebugProjectContainer->ContainerM2a0hsd\{closure}()in EventDispatcher.php line 229

at EventDispatcher->sortListeners('kernel.request')in EventDispatcher.php line 61

at EventDispatcher->getListeners('kernel.request')in ContainerAwareEventDispatcher.php line 128

at ContainerAwareEventDispatcher->getListeners('kernel.request')in TraceableEventDispatcher.php line 262

at TraceableEventDispatcher->preProcess('kernel.request')in TraceableEventDispatcher.php line 137

at TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent))in HttpKernel.php line 127

at HttpKernel->handleRaw(object(Request), 1)in HttpKernel.php line 68

at HttpKernel->handle(object(Request), 1, false)in Kernel.php line 200

at Kernel->handle(object(Request), 1, false)in index.php line 86

 

Edited by elshekar (see edit history)

Share this post


Link to post
Share on other sites

The missing table you can find in \prestashop_1.7.6.0\prestashop\install\upgrade\sql folder. Open the file 1.7.6.0.sql, replace PREFIX_ with your database prefix, and import. It will solve the issue.

Share this post


Link to post
Share on other sites

I update you

I have this configuration:

WINDOWS SERVER 2019 with IIS 10
MySQL 8.0.16.0
PHP 7.2.16
PHPMYADMIN 4.9.0.1
Prestashop 1.7.6.0

I did a complete new installation test of Prestahop 1.7.6.0 and when appear the problem at 23% I remove the MODERN directory and procede with the installation.
At the end of installation I insert in the final path the MODERN directory and everything seems to work properly.

Now I have “only” these problem on the back office when I click on:

IMPROVE -> PAYMENT -> PAYMENT METHODS
IMPROVE -> INTERNATIONAL -> TAXES
CONFIGURE -> STORE PARAMETERS -> TRAFFIC & SEO

Appear the message: Server error - 500 - Internal server error -There is a problem that does not allow you to view the desired resource.

If I enabling the Debug Mode these problems do not occur.

I removed the ps_mbo module and can now log in without problem at:
IMPROVE -> PAYMENT -> PAYMENT METHODS

The problem remains with:
IMPROVE -> INTERNATIONAL -> TAXES
CONFIGURE -> STORE PARAMETERS -> TRAFFIC & SEO

Kind regards

STEP.jpg

Share this post


Link to post
Share on other sites
En 18/7/2019 a las 4:19 AM, Lencher dijo:

The missing table you can find in \prestashop_1.7.6.0\prestashop\install\upgrade\sql folder. Open the file 1.7.6.0.sql, replace PREFIX_ with your database prefix, and import. It will solve the issue.

Thank you Lencher (is your fist message and is for help us). I think i'll continue for the moment with working with my 1.7.5.2 until an update of 1-Click appears or a Prestashop 1.7.6.1 that solves this types of issues

Share this post


Link to post
Share on other sites

Ah and one more thing

Always perform a manual full backup (files+bbdd). DO NOT TRUST 1-CLICK UPGRADE restore points. In my case (some posts ago) I was able to restore the 1-click upgrade Backup of the 1.7.5.2, but today I saw that I was missing some tables and can't access the clients and lost carts sections

Finally I was able to restore BBDD and files of the 17/07/19 with my hosting provider backup recovery points (thanks god)

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

×

Important Information

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