Mark Llobrera

Drupal’s Ctools Object Cache

Not sure why (there are so many things I don’t know about Drupal, frankly) but occasionally when creating/cloning a View, I’ll get the following error message when saving:

PDOException : SQLSTATE[23000]: Integrity constraint violation:

I’ve taken to using a workaround gleaned from this thread on drupal.org. I examine the database using Sequel Pro, find the ctools_object_cache table, and find the row entry for the View I’m trying to create. Deleting that row and attempting to save again usually does the trick. My guess is that the operation creates the temporary entry in the Ctools object cache, but when saving fails you still have the entry in that table. So attempting to re-save results in a collision with that cached object.