0

So I installed a module on my staging environment and all worked fine. However installing it on the live site hit a SQL error in one of the many upgrade files.

So I set the module XML files to false and, same error. Same error code too which I thought was not possible with Magento (I remember error codes being unique always).

Va SSH I've cleared the cache, compiled, disabled compilation, disabled caches, deleted the entire var directory after making a backup even and deleted the module files.

Still the error shows the same error code to the same file, a file that no longer exists, after deleting the var directory, the error file doesn't even exist, its like its stuck thinking it needs to show an error that's not happening (Though when I load the page for a split second I do see a var_dump of something).

The site has a massive database and file structure that restoring the last backup for everything to clear the issue will take about an entire day so I don't want to have to use that last resort.

EDIT

The error in question is

a:5:{i:0;s:228:"Error in file: "/home/runway/public_html/app/code/local/Ebizmarts/SagePaySuite/sql/sagepaysuite_setup/mysql4-upgrade-3.0.11-3.0.13.php" - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'base_surcharge_amount'";i:1;s:862:"#0 /home/runway/public_html/includes/src/__default.php(7842): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/runway/public_html/includes/src/__default.php(7634): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '3.0.11', '4.1.7')
#2 /home/runway/public_html/includes/src/__default.php(7517): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('3.0.11', '4.1.7')
#3 /home/runway/public_html/includes/src/__default.php(7432): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/runway/public_html/includes/src/__default.php(30269): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/runway/public_html/includes/src/__default.php(30195): Mage_Core_Model_App->_initModules()
#6 /home/runway/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /home/runway/public_html/index.php(90): Mage::run('', 'store')
#8 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

EDIT 2

Looks like I'm now able to access the entire site bar the homepage which still has the error page stuck on it.

2
  • paste the error please Commented Oct 26, 2016 at 12:06
  • I've added the error, though the issue is not the error as much as why the error is occurring for a file that has been at one point deleted, on an inactive module, and an error page is displayed with a error code that doesn't even exist in var/reports anymore Commented Oct 26, 2016 at 12:10

1 Answer 1

1

The issue comes the fact it's trying to reinstall a version of the module that's already been installed in the past. Open the file in question and chuck a return; at the top of it; then re-run the install.

Be careful though, some installs only run partially so make sure that everything in that setup file has been executed once.

Also very important, when you move a module to live, make sure all your caches are disabled, then don't forget to turn them back on when you're done

3
  • Well the module is installed just fine and seems to be working, however the homepage still gives the same error. Every other page is still fine. And I still don't have a single report in var/reports Commented Oct 26, 2016 at 12:58
  • Are you using Varnish or FPC maybe? It screams your homepage has been cached, or else you would get the error message everywhere Commented Oct 26, 2016 at 14:45
  • After clearing every cache under the sun this was still not working. However after exactly 12 hours to the second it started working again, So it seems there is a cache somewhere I've not been informed of by out hosts. Commented Oct 27, 2016 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.