Request for pathauto integration per group bundle.
Out of the box logical paths would be great for group entities per bundle.
Example: http://example.com/[bundlename]/[%node]

And also for the gnode components.
It seems that logical paths exist to add a new node for a group, but not for view and edit.
Example: http://example.com/[bundlename]/[%gid]/[content-type]/[%node]/edit

Comments

kristiaanvandeneynde’s picture

Status: Active » Needs review

Try the latest dev (make sure you configure and save aliases in pathauto config).

neurer’s picture

Works, but am getting: "Notice: Undefined property: Group::$gid in Group->defaultURI() (line 30 of (...)group.inc)." upon group creation. Also adds duplicate alias entries as group/ with the group type pattern set to [group:title] for me.

Any advice would be appreciated.

twix’s picture

I got error in "path/patterns":
The Default path pattern (applies to all group types with blank patterns below) is using the following invalid tokens: [group:title].

twix’s picture

It might also be useful in the group bundle to have a permanent readonly unique url friendly field to set the uri for the group, so links cant get broken incase the title field changes etc.
[group:uri] or something like that.

kristiaanvandeneynde’s picture

Hey guys, thanks for testing this so soon :)

Could you try enabling Entity Tokens? I forgot to add a dependency check for that one.

neurer’s picture

thanks for testing

Sure, you're welcome. Thanks for your effort!

Enabling "Entity Tokens (7.x-1.5)" gets rid of the error mentioned in #3, but the bugs mentioned in #2 remain for me.

twix’s picture

I got #2 as well after creating new group

Notice: Undefined property: Group::$gid in Group->defaultURI() (line 30 of /var/www/sites/all/modules/group/classes/group.inc).

Status message

Created new alias sites/test for group/.
The sites test was saved successfully.

There's no group id for "Created new alias sites/test for group/." in the status msg.

Also i get page not found when going to "sites/test" and in the "admin/group" the links to groups in the table still point to the system uri "group/2"

neurer’s picture

I'm observing the same behaviour described in #7 when "bulk generating" via pathauto -- alias seemingly gets created but still points to "group/gid" according to "admin/config/search/path". Manually adding a group appears to work though -- alias gets created and points to the correct URI.

One more thing: When checking "Group" in "Available entity types" at "admin/config/search/path/entities" I'm able to bulk generate with pathauto. But get Warning: strlen() expects parameter 1 to be string, array given in drupal_validate_utf8() (line 1601 of ... /includes/bootstrap.inc) and Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1573 ... includes/bootstrap.inc).

Addition: Checking "Group" in "Available entity types" also gives me Fatal error: Unsupported operand types in ... modules/field_ui/field_ui.admin.inc on line 477 at "admin/group/type/manage/.../fields".

Hope this helps.

twix’s picture

Group tokens are not available in the path patterns ui for node content types.
Can the gnode content types be available in the group section of the url pattern ui?

kristiaanvandeneynde’s picture

  • Latest commits should fix #2 and entity_token 'dependency'.
  • @jant (#7): I don't have admin/config/search/path/entities. What I do have is admin/config/search/path/update_bulk. Also, bulk updating works fine in my test environment. Must be another module interfering (pathauto_entity)?
  • @twix (#9): Have you checked for [node:group:...] ?
neurer’s picture

Works well after initial tests. No issues so far on my part.

@kristiaanvandeneynde: Must be another module interfering (pathauto_entity)?"
Correct. This comes from pathauto_entity. Commit (#10) fixed that error for me as well.

Thank you. Much appreciated.

kristiaanvandeneynde’s picture

Status: Needs review » Fixed

Seems fixed then, please re-open or create a follow-up if it isn't.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.