GroupSlugRouter Download 3.0

Dutch 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..

Comments
Dutch Eric redegeld Replied 9 months ago

Image

now testing

Dutch Eric redegeld Replied 9 months ago

Yess bare with me. Fortunately its not mandatory. Now time to test it on vps and shared hosting

German Dominik L Replied 9 months ago

hello, any update?

Dutch Eric redegeld Replied 10 months ago

Check. Got the fix. Now testing

German Dominik L Replied 10 months ago

The problem is, when you open administrator panel, then click on the new menu
enter image description here

it takes me to /administrator/administrator/group-slugs/fix

and this:enter image description here

Dutch Eric redegeld Replied 10 months ago

Currently in Italië. But whats seems to be the problem.

Dutch Harry Stok Replied 10 months ago

ai, oke, the admin restore slugs gives to me a 404 to. I never seen this item ;)

German 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 ...

Dutch 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.

German Dominik L Replied 10 months ago

Installed version 3 and tried to create a slug:

enter image description here

OSSN 8.1 premium version

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

Component

Developer: eric
License GPL v2
Type: User admin
Requires OSSN Version : 8.0
Latest Version: 3.0
Last Updated 10 months ago
Repository Url View Repository