The panopoly_pages module assigns some default permissions in panopoly_pages_modules_enabled(). This means that the installation of a profile fails if not all required modules are installed. In my case with the following notice:

Notice: Trying to get property of non-object in panopoly_pages_modules_enabled() (line 171 of /panopoly_pages/panopoly_pages.module).
Notice: Undefined index: administer panelizer node panopoly_page breadcrumbs in user_role_grant_permissions()

Because I noticed this during a failed site installation (and thus logging wasn't completely available), I haven't been able to troubleshoot this completely yet. So far it looks like 'administer panelizer node panopoly_page breadcrumbs'. means that panels_breadcrumbs is required. Which could mean that panels_breadcrumbs or panopoly_core should be added as a dependency. (Neither are part of my profile's makefiles.)

I'll try to leave a follow-up or patch when I know more.

Comments

hefox’s picture

Version: 7.x-1.0-rc4 » 7.x-1.x-dev
StatusFileSize
new1.08 KB

panopoly_core is needed for 'editor' role also, so that dependency should defiantly be added

Also need to clear a cache to get new panelizer permissions sometimes, patch attached

hefox’s picture

Status: Active » Needs review
xgmorkx’s picture

Any steps on how to reproduce this notice to test/review if it works on the latest code?

hefox’s picture

Well, it's fixed installing openatrium from install.php for several people, so that's one way to test.

xgmorkx’s picture

Tried with latest code. On the Apps part during install I get a

Warning: Illegal string offset 'name' in apps_profile_apps_select_form() (line 101 of /var/www/------/sites/all/modules/contrib/apps/apps.profile.inc).

But looks like a different issue to me. Guess we can close this then!

hefox’s picture

Status: Needs review » Reviewed & tested by the community
hefox’s picture

Hm, panopoly pages has been covering up for a bug in defaultconfig I think, #2043307: 'features.defaultconfig.inc' file never added during install -- what is 'group' key for?, the features flush cache isn't needed. May update the patch here later.

mpotter’s picture

Status: Reviewed & tested by the community » Needs review

Still actually getting this in OA2 even with this patch. So something else is going on. Will review the issue you linked for defaultconfig.

mpotter’s picture

Hmm, I'm getting something slightly different than the original post I guess:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'rid' cannot be [error]
null: INSERT INTO {role_permission} (rid, permission, module) VALUES (:db_insert_placeholder_0,
:db_insert_placeholder_1, :db_insert_placeholder_2); Array
(
[:db_insert_placeholder_0] =>
[:db_insert_placeholder_1] => administer panelizer node panopoly_page breadcrumbs
[:db_insert_placeholder_2] => panelizer
)
in user_role_grant_permissions() (line 3076 of
/opt/clients/demo.openatrium.com/drupal/modules/user/user.module).

mpotter’s picture

Added some debug statements and it looks like the code in panopoly_pages is running *before* the editor role in panopoly_core is created.

mpotter’s picture

Looks like this was originally discussed here: #1837312: Troubles Implementing Default Permissions for Panelizer. Not sure what has changed and why panopoly_core is not running first now.

mpotter’s picture

Wondering how this ever worked. Defaultconfig does it's magic in defaultconfig_modules_installed(). So it seems that the 'editor' role would not get created until after modules are enabled. Thus, the panopoly_pages_modules_enabled() running before the roles are created in defaultconfig.

mpotter’s picture

Status: Needs review » Reviewed & tested by the community

Looks like this problem was resolved in #2043307: 'features.defaultconfig.inc' file never added during install -- what is 'group' key for? except this patch wasn't being applied to Open Atrium profile if you had an older version of git because it wasn't specifying git as the download method in the .make file. Fixed this and now it's getting past the panopoly_pages problem.

Moving this back to RTBC since panopoly_core is certainly a dependency.

mpotter’s picture

#1837312: Troubles Implementing Default Permissions for Panelizer has a better solution for the cache clear. So all we really need here is the dependency.

mpotter’s picture

New patch for just the dependency.

dsnopek’s picture

Version: 7.x-1.x-dev » 7.x-1.0-rc5
Issue summary: View changes
Issue tags: +sprint

Adding the "sprint" tag - we're going to focus on this for the next release!

mrfelton’s picture

Status: Reviewed & tested by the community » Fixed

This has been committed to dev. Thanks.

Status: Fixed » Closed (fixed)

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