Closed schoenid closed 2 years ago
The behavior seems to be like in D7, for anonymous the link becomes a redirect:
/user/login?destination=group/node/123/subscribe/og_group_ref
While this can be the desired output for some groups/sites, I agree that this might not always be the right thing. Maybe it could become an additional setting to show/hide for anonymous (then this would be a feature request).
In the meantime people can use the proposed workaround - many thanks @schoenid for providing it.
Maybe it could become an additional setting to show/hide for anonymous (then this would be a feature request).
Where would the setting be provided: in the field settings?
In the meantime people can use the proposed workaround
Here's another one:
node/%
, Type is Group)admin/structure/types/manage/group/display/default
: Hide the Group fieldadmin/structure/layouts/manage/group
: Add the Group field as a blockWhile this can be the desired output for some groups/sites, I agree that this might not always be the right thing. Maybe it could become an additional setting to show/hide for anonymous (then this would be a feature request).
I agree, in that case this should be a feature request.
Here's another one:
- Requirement: a specific Layout for Groups (path: node/%, Type is Group)
- admin/structure/types/manage/group/display/default: Hide the Group field
- admin/structure/layouts/manage/group: Add the Group field as a block
- Add a Visibility condition to the block, so that it's not shown for the role "Anonymous"
Right, thats another kind of filter ... Thanks a lot !
@schoenid Can you test with the latest code and see if this is still an issue or if the fixes that went in recently took care of this?
@laryn
Can you test with the latest code and see if this is still an issue or if the fixes that went in recently took care of this?
Well, I can't call it an "issue" anymore ...
I found, that the best to fit the requirements will be,
admin/structure/types/manage/group/display/default: Hide the Group field
CONTEXTUAL FILTERS --> Content: Nid (Content ID from URL) FORMAT: Unformatted list FIELDS: Content: Group (Formatter: OG subscribe link) FILTER CRITERIA: Content: Type (= Group)
The Access will then be set either by
This will give the output of either
I have to add the last comment to the WIKI, as soon as we have a structure, where it fits in ... or as soon as we created it ...
While group content is made visible for guests (ANONYMOUS or nonauthenticated users), I found, that also the Request Group Membership link is visible.
This is ugly, because a nonauthenticated user can't become a group member. The Request Group Membership link must be hidden for the user role ANONYMOUS.
Workaround
To solve the problem I've disabled the Group field in the groups content type (MANAGE DISPLAYS) and then I've created a view as a workaround with the following configuration:
CONTEXTUAL FILTERS
RELATIONSHIPS
FIELDS
(This gives the link ...)
FILTER CRITERIA
(This makes sure, the link is only displayed for a registered user, if (s)he is not a member of the current group node.)