Prestashop: Upgrade 1.6.1.24 => 1.7.7.0 fails ; XmlLoader Call to a member function trans() on null

Created on 4 Dec 2020  路  4Comments  路  Source: PrestaShop/PrestaShop

Describe the bug

Bug found by @SD1982

[INTERNAL] /var/www/html/builds/1.6.1.24/src/PrestaShopBundle/Install/XmlLoader.php line 467 - Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function trans() on null #0 /var/www/html/builds/1.6.1.24/src/PrestaShopBundle/Install/XmlLoader.php(347): PrestaShopBundle\Install\XmlLoader->flushDelayedInserts() 
#1 /var/www/html/builds/1.6.1.24/src/PrestaShopBundle/Install/Install.php(476): PrestaShopBundle\Install\XmlLoader->populateEntity('tab') 
#2 /var/www/html/builds/1.6.1.24/admin8932wiobg/autoupgrade/latest/install/upgrade/php/migrate_tabs_17.php(63): PrestaShopBundle\Install\Install->populateDatabase('tab') 
#3 [internal function]: migrate_tabs_17() 
#4 /var/www/html/builds/1.6.1.24/modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php(395): call_user_func_array('migrate_tabs_17', Array) 
#5 /var/www/html/builds/1.6.1.24/modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php(360): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader->runPhpQuery('1.7.0.0', '/* PHP:migrate_...') 
#6 /var/www/html/builds/1.6.1.24/modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php(284): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader->runQuery('1.7.0.0', '/* PHP:migrate_...') 
#7 /var/www/html/builds/1.6.1.24/modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php(55): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader->upgradeDb('1.6.1.24') 
#8 /var/www/html/builds/1.6.1.24/modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php(101): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader17->upgradeDb('1.6.1.24') 
#9 /var/www/html/builds/1.6.1.24/modules/autoupgrade/classes/TaskRunner/Upgrade/UpgradeDb.php(41): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader->doUpgrade() 
#10 /var/www/html/builds/1.6.1.24/admin8932wiobg/autoupgrade/ajax-upgradetab.php(53): PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade\UpgradeDb->run() 
#11 {main}

Expected behavior

Upgrade should work flawlessly

Steps to Reproduce

Steps to reproduce the behavior:

  1. Install PS 1.6.1.24 and module autoupgrade
  2. Run upgrade to PS 1.7.7.0
  3. See error
  • PHP version: 7.1
1.6.1.24 1.7.7.0 Autoupgrade Bug Fixed Major Must-have PR available Regression

All 4 comments

@hibatallahAouadni Is it a regression ?

@atomiix Do you know if the fix should be done in the module or in the core ?

@marionf the fix should be done on the core

Fixed by #22274

Was this page helpful?
0 / 5 - 0 ratings