Upon activating the commerce shipping module, Drupal reports as follows:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'robots_db.cache_commerce_shipping_rates' doesn't exist: TRUNCATE {cache_commerce_shipping_rates} ; Array ( ) in cache_clear_all() (regel 169 van /home/robots/public_html/includes/cache.inc).
Can I create this table manually, or is there a .sql-script I can use to create it manually?
Deactivating the module restores the Drupal site back to a working state. Removing the module from the modules directory, putting it back in the directory and activating the module again, reproduces the error in the exact same way.
Can anybody help me to get past this error, please?
Regards,
Chris
Comments
Comment #1
googletorp commentedComment #2
rszrama commentedCurious. Did you perhaps try to upgrade from Shipping 1.x to 2.x? If so, that isn't supported yet. Otherwise, that cache table gets created when you install 2.x and I don't know any reason for it to be missed.
Comment #3
matroos69 commentedIt was a clean install, directly 2.x. Is there a way that the table creation script can be isolated, so I could run the table creation script manually?
Comment #4
rszrama commentedComment #5
minneapolisdan commentedThanks, I had the same issue, and this fixed it.
Comment #7
wzoom commentedPlease add this code to the current dev version of commerce_shipping.install, it is still not there
Thank you.
Comment #8
rszrama commentedThat's because it isn't necessary in Drupal 7. ; )
http://api.drupal.org/api/drupal/modules--system--system.api.php/functio...
Comment #9
garron commentedI have the same issue, but mine is because I installed 1.x before realizing that 2.x was what I needed. Is there a way to fix this without shell access or Drush? I uninstalled and even dropped the commerce shipping tables to try to get back to a fresh install. Is there a way to either re-running the installation script, or some SQL script to get 2.x running?
Comment #10
rszrama commentedIf you've uninstalled Shipping 1.x, you might just try removing the Shipping module entirely and clearing your site cache. This should reset the system table in your site to not think the Shipping module is around / installed. If the problem is that you uninstalled Shipping 1.x with Shipping 2.x code on the server, maybe putting Shipping 1.x back on the site and uninstalling would sort it out.
Comment #11
garron commentedRyan, thank you for your prompt attention to this. (I'm huge a fan, BTW.)
After restoring the database (after I deleted everything shipping from the database which mucked up my site amazingly) I physically deleted shipping from the modules folder, reloaded and re-installed the 1.x code and flushed cache. Weirdly enough, my modules page still read 2.x, along with UPS which wasn't even in the modules folder anymore. After dis-enabling 1.x shipping, I was able to uninstall the modules. Then in FTP I deleted the 1.x folder and flushed the cache again. It didn't seem to change anything. The modules page still has the 4 - 2.x shipping modules listed (1.x UPS), and the database still has the field_data_shipping_method table among others. I am at a complete loss. I know that 2.x will do everything I need, and my site completion is so close I can taste it. Any thoughts at all?
Thanks again.
Comment #12
rszrama commentedThe persistence of that one field is likely due to the module not cleaning up its field data directly. That may just need to be added, but I imagine we'd clean that up as part of an update path from 1.x to 2.x. The deeper issue if you're getting conflicting version numbers like this is that you probably have multiple versions of the module in valid modules directories somewhere. Poke around and see where else you may have installed it.
Comment #13
garron commentedYes, I believe you are right that it's a good fit for the 1.x to 2.x path. In my exasperation - instead of going on a drinking binge - I went through the process again of uninstalling (and praying) and reinstalling the 2.x version (and praying) and it suddenly started working. The module registry was somehow reset, and showed the proper files. Maybe some weird cache glitch? I have now gotten UPS and Flat Rate installed and it looks like everything is a go.
I personally appreciate that you guys hadn't yet devoted the time to mapping the 1.x upgrade in your hyperdrive push to deliver a solid shipping solution.
(Though I accidentally caught my scarf in the turbines.) Thanks again for your inspired work and for taking the time to help a lowly site builder.
Comment #14
rszrama commentedhehe Thanks for the feedback. : )
Comment #15
agileadamThis may be helpful to someone, so I'm posting it here.
I've recently had trouble on three different sites setting up commerce_shipping due to missing tables and fields in the DB. The easiest way I've been able to resolve the issues is by:
It was only after doing those steps that commerce_shipping worked. It could be because Commerce Shipping v1 was installed and not completely removed before installing v2, but I cannot be sure.