Drupal Group and Group Node on Sandbox

36 views
Skip to first unread message

William Conlin

unread,
Jul 20, 2022, 5:12:13 PM7/20/22
to islandora
Not long ago I was fiddling with using groups, and had noticed that it was included in the Islandora sandbox.

I have a version of isle-dc running which I have installed group, group media and group node onto. It works like a charm, and I can easily add content to a group.

However on Islandora sandbox currently, you cannot add nodes to a group. It seems to only accept users, I added the 'typed relation: Content' to the fields and I cannot tell that the settings are any different between sandbox and my own isle-dc.

I was trying to help a co-worker add Group node to his isle-dc instance, and we got this error:

In DefaultTableMapping.php line 391:
Table information not available for the 'field_coordinates' field.

I have tried tracking down a difference in our database tables that might account for this, but I am having no luck. Any advice, help or further questions are appreciated.

Thanks,
Will

Rosie Le Faive

unread,
Jul 20, 2022, 5:54:56 PM7/20/22
to islandora
There's a weird little thing in the install profile that messes with Groups. It does it here, in the included "core" module

The point of that code is so that you can create your groups, then a Taxonomy term with the same name as the group (which apparently has to be the same as the group type? i'm not super clear on why) then by adding the taxonomy term to a piece of content, you add it to the group.  It was designed to work as a drop-in replacement to permissions_by_term, which has scaling issues.

William Conlin

unread,
Jul 21, 2022, 12:06:26 PM7/21/22
to islandora
Interesting,

I'm not sure if that is affecting my demo environment (but I'm not sure how to tell for certain) When I spin up a demo isle-dc it doesn't include the group module (I'm at commit 48a18c985d, which runs
drupal 8.9.16).

I don't have any taxonomy terms relating to the group type I created. but I definitely have content in my groups.

I wasn't aware of the scaling issues for permission_by_term, so that's good to know.

Thanks Rosie, I'm sure I'll figure something out.
group_members.png

William Conlin

unread,
Jul 21, 2022, 3:02:31 PM7/21/22
to islandora
Ok. I'm caught up to the much more recent pull of isle-dc. I see that groups is included. I have created a group. But where in the "Edit" form of a given piece of content should I add the group name taxonomy term?

William Conlin

unread,
Jul 21, 2022, 4:19:33 PM7/21/22
to islandora
Went through a lot of iterations of creating group type 'LSU', then an individual group 'LSU' of that type, creating a taxonomy vocab 'LSU' with a Vocab Term 'LSU'. We installed "Group node (Repository Item)" to the group LSU.  When we get to adding content to the group: after we submit the form to add a repository item the site returns page not found:  /group/2/content/7  (just an example).

Instead of adding existing content to the group, I added new content (which was created just fine) but it is also not in the group.

I know I had success adding content to groups, before the module was included in the isledc-build. I just can't seem to figure this out.

Thanks again for any assistance. I hope I'm making sense...
page_no_Found_group_content.png

Rosie Le Faive

unread,
Jul 21, 2022, 6:39:58 PM7/21/22
to islandora
As I understand the code
- you must use the field field_access_terms
- you must set the value of field_access_terms to the taxonomy term that's named the same as your group.
- just make a node normally, don't try to add it to the group. When you save the node, this will kick off and add it automatiacally to the group.
- similarly if you want to remove it from the group you have to do that by removing the taxonomy term, NOT by attempting to modify the group membership.

Maybe it doesn't work! I don't know. It's not documented, tested, or (AFAIK) maintained. Like the rest of the install profile, which will likely be deprecated in the near-ish future.

William Conlin

unread,
Jul 22, 2022, 11:15:48 AM7/22/22
to islandora
Thank you! I got it working.

for anyone else:
I edited the fields for 'Content (repository item)'
Add the taxonomy term you create for your group here:
admin/structure/types/manage/islandora_object/fields/node.islandora_object.field_access_terms

for the field 'Access Control' (field_access_control) I saw a checkbox for my Taxonomy term under 'Refrence Type'
I edited a node of content, and 'Access Control' under the 'System' header now had a checkbox. checked it, saved and it was added to my group.

I'll probably play around with this a bit. We're going to have at least 19 different groups in our repo, so I was wondering if there might be a way to use a Drop-down instead of a checkbox. But for now this is perfect.

Thanks Again!!!

William Conlin

unread,
Jul 22, 2022, 12:09:50 PM7/22/22
to islandora
Noticed a slight difference with isle-dc fixing_initial_install_options branch (make demo) compared to the islandora sandbox page:

On sandbox I was able to add nodes easily by just installing 'Group Node (Repository Item)' for the group type.
On the isle-dc demo however I had to install each 'Group media (<type>)' to get things added.
Otherwise the isle-dc givves a 'page not found' and reports a SqlContentEntityStorage error.

Not a big deal, but worth noting.
Reply all
Reply to author
Forward
0 new messages