Trying to upgrade my child distro to the latest version of Panopoly, gives me the following on BOA / Aegir.

Upgrading Executing panopoly_pages_update_7101 
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'rid' cannot be null
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

candelas’s picture

Hello

Same here. I found #2296899-3: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null. Since I had Devel installed, I uninstalled but the error still happens.
The patch is #2293947-41: Make "Landing Page" into node + Panelizer (rather than a Page Manager page)
I was trying to update Open Atrium 2.32 to 2.33 that makes the update from Panopoly 7.x-1.18 to 7.x-1.19
I hope is solved soon because I can't update OA
Searching, I think this can be related #2183937: Error on install of Panopoly-based install profile: "Column 'module' cannot be null" when profile starts with "e"

candelas’s picture

the update that gives the error is panopoly_pages_update_7101

candelas’s picture

I realize that the error comes because I have not an editor role, so its rid == NULL.
So I made a minimal patch where

  foreach (array($editor->rid, $admin->rid) as $rid) {
    user_role_grant_permissions($rid, $node_landing_page_perms);
  }

changes to

  foreach (array($editor->rid, $admin->rid) as $rid) {
    if($rid !==NULL){
      user_role_grant_permissions($rid, $node_landing_page_perms);
    }else{
      drupal_set_message(t("New permissions have been created for Panopoly Landing Page. "
              . "Please check them for your roles."),'warning');
    }
  }

I run the update and no problem now :)
I upload here that patch with the doubt that if I should upload it to the Panopoly Pages module instead than here...

Also I doubt in the module naming. In https://www.drupal.org/project/panopoly_pages/git-instructions they say the patch should be named git diff > [description]-[issue-number]-[comment-number].patch
but in https://www.drupal.org/node/707484 they say git diff > [project_name]-[short-description]-[issue-number]-[comment-number].patch

I choose the second, but please, tell to me if it is right :)

candelas’s picture

doubt solved:
I upload here that patch with the doubt that if I should upload it to the Panopoly Pages module instead than here...

I see that the Panopoly Pages issue cue directs to here :)

candelas’s picture

Status: Active » Needs review
dsnopek’s picture

FileSize
511 bytes

Here is a much simplified version of this patch. Can you double check that this works for you as well? Thanks!

candelas’s picture

:)
Yes, it works. Thanks

dsnopek’s picture

Status: Needs review » Fixed

Great! Thanks, @candelas, for finding the problem and writing the original patch. The patch name was fine, but I usually use underscores in the project name (so, 'panopoly_pages-" rather than "panopoly-pages-").

Committed!

  • dsnopek committed ba40286 on 7.x-1.x
    Update Panopoly Pages for Issue #2456635 by candelas, dsnopek: SQLSTATE[...
candelas’s picture

Thanks for correcting to me :)
I just realize a couple of days that I was forgetting that (in the Drupal instructions they say it clear, but I am learning so many things... and two informations). Thanks for teaching.
I am very very happy to have being able to collaborate :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

boabjohn’s picture

Sorry guys, no intentiion to backtrack here, but:
I've just tried to go from Panopoly 1.21 to 1.23 and got the error @candelas reports in #1 :
1048 Column 'module' cannot be [error] null ...
Which is different to the 'rid' problem later described, or not?
In any event, after Dave's commit to dev 3 months ago, I'm wondering why the point release 1.23 from 12 days ago is causing this issue?
Since my 1.23 install is not fully updated now (update .._7101 is still outstanding), I'm not sure what to patch (or not?)

johnrosswvsu’s picture

I have this for testing purposes only. Seems a check on the role object is needed.