eric redegeld
10 months ago
🔗 GroupSlugRouter – Clean & Friendly Group URLs + Profile Integration group overview
Give your OSSN groups a professional touch!
🔍 Key Features Implemented
Slug Generation
Automatically generates a slug from a group’s title upon creation.
Stored as an object entity of subtype groupslugname.
Ensures unique slugs using incremental suffixes (e.g., groupname, groupname-1, etc.).
Vanity URL Routing
Redirects https://your-site/g/slugname to the original group URL.
Profile Integration
Adds a Groups tab to user profile pages showing owned groups with sorting options.
Admin Debug Tool
/slugdebug allows admins to test slugs and resolve issues.
Slug Recovery Tool
/administrator/group-slugs/fix allows batch creation of slugs for groups that missed it due to legacy or import issues.
Slug Update on Title Change
When a group title is updated, the corresponding slug is automatically updated and old slugs are deleted.
Critical Discoveries & Fixes
Missing Groups on Activation
Some older groups (e.g., group 291) were not getting slugs during activation due to inconsistent structure or lack of metadata.
This was fixed by:
Switching from ossn_get_entities to raw ossn_get_object queries during activation.
Adding logging to track group title and slug status.
Manual Slug Manipulation Risks
A competing module allowed manual slugs, breaking the link between group title and URL.
GroupSlugRouter now ensures slugs are strictly based on group titles for consistency and integrity.
Error Handling
Fixed early crash due to missing ossn_get_data() by replacing it with ossn_get_object().
Prevented require_once failures with correct GROUPSLUGROUTER path usage.
Admin Warning
If the legacy UserGroups module is active, an admin warning is displayed to avoid conflicts.
đź§ Extra Notes
Slugs are not stored in the ossn_object table but separately as ossn_entities, type object, subtype groupslugname.
Debug logging was extensively used ([SLUG] ...) to track behavior in real time.
đź’ˇ Built with care by Eric Redegeld
Special thanks again to the OSSN community member for taking the time to share insights..
Eric redegeld
Replied 9 months ago

now testing
Eric redegeld
Replied 9 months ago
Yess bare with me. Fortunately its not mandatory. Now time to test it on vps and shared hosting
Dominik L
Replied 9 months ago
hello, any update?
Eric redegeld
Replied 10 months ago
Check. Got the fix. Now testing
Dominik L
Replied 10 months ago
The problem is, when you open administrator panel, then click on the new menu

it takes me to /administrator/administrator/group-slugs/fix
and this:
Eric redegeld
Replied 10 months ago
Currently in Italië. But whats seems to be the problem.
Harry Stok
Replied 10 months ago
ai, oke, the admin restore slugs gives to me a 404 to. I never seen this item ;)
Michael ZĂĽlsdorff
Replied 10 months ago
I can confirm what Dominik wrote.
@Harry
this link on the admin page is working for you? ... strange ...
Harry Stok
Replied 10 months ago
@Dominik L The normal link give a 404 , but if you use /g/groupname its working if you that mean.
Dominik L
Replied 10 months ago
Installed version 3 and tried to create a slug:

OSSN 8.1 premium version
I also tried on a complete clean installation of 8.1 premium version, same problem