'Table already exists' error
I'm currently in Advanced Site Building. Around lesson 61 of 246, I installed Panels. However Panels was not working so I reverted to a previous backup and began retracing my steps. (Either Panels or something I did seems to have prevented the display of the sidebar 2nd and the image. I may have selected "Full Content" display instead of Default display, which was set up for 3 columns etc.) In any case, retracing my steps did restore the columns and the image, but when I tried to install Panels again I got this message:
DatabaseSchemaObjectExistsException: Table panels_display already exists. in DatabaseSchema->createTable() (line 657 of /Users/MacBookPro/Sites/acquia-drupal/includes/database/schema.inc).
It seems this opens a whole can of worms: The vast majority of modules do not have an uninstall option and there is no clear, systematic way to uninstall them. This post reveals some of the nuances:
https://www.drupal.org/node/1551132
It would seem that removing some modules requires locating its entry in the MySQL table and deleting it. I'm wondering how so important a procedure could have so little space in the Drupal forums or BAM.
Is Drush the key? I know Drush installs but haven't used it for uninstall.
Any and all insights are greatly appreciated.
Peter
Hi Peter,
It does look like a bit of a can of worms, but you can keep it simple for now. If you are comfortable using PHPMyAdmin or another database admin tool, I believe you can remove any tables that cause this error to get the backup to restore properly. Of course, long term it would be great if there's a patch that resolves this without requiring mucking around with the database directly.
I don't know of anything that would cause Drush to work any differently than restoring a backup through the interface, so I'm not sure that's a solution, though if someone else has a different experience, that would be great to hear.
I hope that helps!
Cheers,
Chris