I use Panopoly and after downloading and making the updated August profile, I wasn't able to run all database updates due to this error:

panelizer module

Update #7300
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AND (entity_type = '')' at line 1: DELETE FROM {panelizer_entity} WHERE (name IN ()) AND (entity_type = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => ) in panelizer_update_7300() (line 1201 of /public_html/profiles/panopoly/modules/contrib/panelizer/panelizer.install).

This is preventing the following updates of panelizer to be made:

 Panelizer  7300  Remove {panelizer_entity} records with only default values.                                                
 Panelizer  7301  Add an index to {panelizer_entity} revision IDs.                                                           
 Panelizer  7302  Set the storage type and ID on existing {panelizer_default} records.                                       
 Panelizer  7303  Set the storage type and ID on existing {panelizer_entity} records. This may  take some time to complete.

I did not run into this issue when updating another Panopoly site however.

Comments

amaisano created an issue. See original summary.

damienmckenna’s picture

Status: Active » Postponed (maintainer needs more info)

I believe this should have been fixed in #2788633: panelizer_update_7120: Not null violation: 7 ERROR: null value in column "pid" violates not-null, please update to the latest -dev snapshot and let me know if it fixes the problem.

helmo’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.07 KB

This seems to be caused by $default_names being empty... See patch.

Status: Needs review » Needs work

The last submitted patch, 3: update_7300_fails_due-2790289-3.patch, failed testing.

helmo’s picture

Status: Needs work » Fixed

Hmm my bad, my patch was against 3.4 not the latest dev... but it turns out #2788633: panelizer_update_7120: Not null violation: 7 ERROR: null value in column "pid" violates not-null already fixed this issue.

damienmckenna’s picture

Very happy to hear it!

amaisano’s picture

Thanks - the patch in #3 worked on my non-dev version. I'm running PHP 5.4.34 and MySQL 5.5.38 btw.

natew’s picture

I was updating a site from panelizer version 7.x-3.2-beta1 to 7.x-3.4 and ran into this issue. The patch resolved this for me. Attached is a re-rolled patch without the full path to the module.

fredcy’s picture

Patch #8 here fixed the same problem for me when upgrading from 7.x-2.0 to 7.x-3.4.

jenlampton’s picture

The patch in #8 fixed the problem for me as well. Thanks @natew.