[FIX] SQL Issue Crmaddon

If you get the following error:

Base table or view not found: 1146 Table 'ashridgetrees.quoteadv_crmaddon_messages' doesn't exist".

It means that the database setup scripts have not run correctly.

To solve this issue, follow the following steps:

Step 1 - Make the changes
Please replace attached setup files for the current ones.
You can find them here: /app/code/community/Ophirah/Crmaddon/sql/crmaddon_setup

Step 2 - Disable caching and compilation mode
After this, make sure you disable all forms of caching and compilation.
1. Disable Cache: System > Cache Management > Select All [check-boxes] > Actions Disable > Submit
2. Re-Index All: System > Index Management > Select All [check-boxes] > Actions Reindex Data > Submit
3. Disable Compilation: System > Tools > Compilation > Disable
Note: By default compilation mode is disabled. So just check if the Compiler Status is Enabled or not.

Step 3 - Enable error reporting
Now we need to rerun the database scripts since this already happened you will get some duplicate errors along the way.
To see the errors, you need to enable error reporting, the easiest way to do this is via your index.php.



//ini_set('display_errors', 1);



//if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {

ini_set('display_errors', 1);

Step 4 - Trick Magento
Next we need to remove the crmaddon_setup record from your core_resources table.
This will make Magento think the crmaddon installation scripts have not run and run them again.
Magento will do this when you try to access the admin panel.
Let's do this! Open your database ( with PHPMyAdmin for example ) and go to the core_resources table.
Now look for the record that is labeled crmaddon_setup and remove it.
Then open your Magento admin panel.

Step 5 - Workaround the remaining errors
Doing this will probably throw an error since you already have run these scripts once.
Look for the last file that causes the error, for example:
Then open up your database again with PHPMyAdmin and open the core_resources table.
Increase both version numbers of the crmaddon_setup record to the last version number of the indicated file.
In the example above, this would be `0.1.5`.
After this, refresh the Magento admin panel and repeat this process for every error you get.

Step 6 - You are done!
These steps did the trick for me. Please test if everything works as expected.
Don't forget to change your index.php file back to its original state.

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk