Fatal errors when using workflows on my site

Permalink
I'm building a proof-of-concept site to go along with a website redesign proposal I'm working on. I've created a workflow, and when I add a new page using Composer, I get this error:

Fatal error: Call to a member function getUserGroups() on a non-object in /home/my_site/concrete/core/models/permission/access/entity/types/group_set.php on line 43


To be more specific, I created two groups, two group sets and two users. The two users, we'll call Writer and Approver. Writer is in Group A, which is a part of Group Set A. Approver is in Group B, and Group Set B. Advanced permissions are turned on, and I have given Group Set A permission to add sub-pages (and view) the Drafts section, the Blog section of the site, the Dashboard (but no pages under it, except for Composer and File Manager). Group Set B has the same permissions, but can approve changes (more on this in a second)

Writer can open up the composer and write a new blog, upload some photos and publish just fine. They can also manually add pages to the Blog section (by going there, Edit > Add Sub Page).

The issue is when workflows are introduced. I create a workflow called "Approver Notify". In it, Group Set B (Approver) can approve and is notified on entry. Group Set A (Writer) is notified on approve / deny.

I attach this workflow to the Blog section (the root page, with sub-page permissions set to inherit from this Blog page), under the "Approve Changes" permission (because according tohttp://www.concrete5.org/documentation/using-concrete5/dashboard/wo... , you can't attach a workflow to Add Sub Pages and some other things).

Now when Writer goes into composer and hits Publish, Approver gets an email saying an item is ready for approval, but Writer gets the error message above.

Now I log in as admin and go to the page to be approved. It tells me there is a change waiting for approval, so I click Approve. The "loading" wheel goes around but never disappears. If I go into Edit > Versions and approve it from there, I get this message:

Fatal error: Call to a member function getUserGroups() on a non-object in /home/my_site/concrete/core/models/permission/access/entity/types/group_set.php on line 43


I'm wondering if I've been too stingy or too generous with my permissions. I think there needs to be a report that can be run that gives you a list of pages and their permissions. Like a sitemap of permissions.

Grayda
 
Grayda replied on at Permalink Best Answer Reply
Grayda
I've just done some more testing, and it turns out that Group Sets are to blame. If I add the users individually to the workflow list, they can use the workflow as intended. If I add groups, they work also. But if I had a group set (a group of groups) then I get the error when dealing with page versions, regardless of who is logged in (admin gets the error, so does writer and approver).

I'll see if I can replicate it on a new site and if I can, I'll file a bug report.

TL;DR: Don't use group sets in workflows. They might not work.