Rather than reopen the relative issues, I created a new one
I want to get group URLs like: website.ext/the-name-of-the-group. So I add the Pathauto module and a pattern for groups. This worked perfectly with the previous versions of Open Social, unfortunately, since 8.3.x, the url are only generated for certain groups.
Moreover, it is not possible to modify the urls of the groups and those of the contents do not generate automatically.
To reproduce on a recent installation of Open Social 8.3.1:
- Create a group, for example group 1 > The url of the group is /group/1/stream. The URL Alias field is present In the display of the group type edit form, but the Alias URL field is not visible in the group edit form.
- Create an event in the group for example event 1 > The url of the event is /node/1. The URL Alias field is present In the display of the content type edit form and the Alias URL field is editable but not filled in in the event modification form. There is no entry in the url alias handling interface on /admin/config/search/path
- Activate the pathauto module > By going to the patterns page on /admin/config/search/path/patterns, there is a pattern type for group content named Group content with the group/[group_content:group:id]/[group_content:pretty-path-key]/[group_content:id]
There is still no url alias entry on /admin/config/search/path - A bulk generation of aliases on /admin/config/search/path/update_bulk does not create an alias for group content.
- Create a pattern for groups on /admin/config/search/path/patterns, for example: [group:title]
- Generate URLs by /admin/config/search/path/update_bulk > The url of group 1 has become /group-1
- Create a group, for example group 2 > The url of the group is /group/2/stream
- Generate URLs by /admin/config/search/path/update_bulk > No new alias is generated and the url of the group remains /group/2/stream. However, two similar aliases have been generated of the type /group/2/member/4
- Delete and then regenerate all aliases only recreates the alias of group 1 and those of group members but not for group 2. The one for group content is still not created.
- Create a pattern for contents on /admin/config/search/path/patterns, for example: [node:content-type]/[node:title]
- Generate URLs by /admin/config/search/path/update_bulk > The url of event 1 has become /event/event-1
- Create an event in group 2, for example event 2 > The url of the event is automatically created at event/event-2
Conclusion:
Despite the relative issues, it would seem interesting that:
- The pattern that appears to be the default in opensocial works and generates urls for group content according to the pattern group/[group_content:group:id]/[group_content:pretty-path-key]/[group_content:id]
- Default Url aliases for groups are /the-group-name
- Activation of the Pathauto module allows generating urls for existing and new groups.
- It is possible to overload the alias of groups in their modification interface.
Hoping to participate in the improvement of Open Social, I thank you for your response.
Comments
Comment #2
ohmdesbois commentedComment #3
Yuri commentedAny updates on this issue?
Comment #4
quixxel commentedIt would be important for me to solve this issue too.
I tried to create an alias from /group/5 to /name-of-that-group
Its not possible
Comment #7
jaapjan commentedThis has been solved in 5.x branch and is to be expected in 5.0 release next week.
See pullrequest:
https://github.com/goalgorilla/open_social/pull/1238
I believe it will solve most of your issues as well!
Comment #8
Yuri commentedThank you @jaapjan and the OpenSocial team. This is great news, and I am very exited, it gives a lot of extra possibilities.
You are an amazing team, congratulations for the steadfast and professional approach.
Comment #9
ohmdesbois commentedThanks !
Comment #10
robertragas commentedNot sure about "#2858902: pathauto not resolving patterns of group content" and think this is not fixed, our first step was also to focus on aliases for content and not specifically members within a group. This would still need some work.
"#2892981: pathauto (url alias) for group content not working" is working. We included a patch from drupal.org/node/2774827 to give the ability to add group tokens into our alias patterns.
This mean that our pattern "[node:group:url:path]/[node:content-type]/[node:title] " will add the group alias if content is placed within a group, otherwise it will generate the alias without.
You can also use this token in your own patterns if the patterns we provide are not specific enough.