As reported also here #5
Pathauto seems not to work correctly and adds some bugs.
I also tried also on a fresh drupal install with only Pathauto, Entity token and token but the bugs persist.
Without pathauto instead, the custom url seems to work fine, in fact, just enter the custom path in admin/config/search/path and it works.
With pathauto instead:
When you create the group the checkbox "Generate automatic URL alias" is activated, and so everything is right.
In the list admin/config/search/path, the alias autogenerated and applied well, in this case is group [group: title] and so far ok.
But if you try to type the new url alias, the site give 404 ... and the page only work with the system url like group/1, also if alias is active and present in the list.
If I try to edit the already created group, i've noted that the checkbox "Generate automatic URL alias" is magically turned off, it is always off in the edit form.
If I try to re active this checkbox(in the edit form).. this every time generate a duplicate of same alias in the admin/config/search/path.
Comment | File | Size | Author |
---|---|---|---|
#6 | group-2422437-6.patch | 1011 bytes | kristiaanvandeneynde |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedOk seems that the problem is here:
function group_pathauto_update_alias(Group $group, $op, $language = NULL)
should be:
function group_pathauto_update_alias(Group $group, $op, $language = LANGUAGE_NONE)
Seems that the default value NULL cause this big problem for me..
D7 use LANGUAGE_NONE Link
Comment #3
kristiaanvandeneyndeHi there, I cannot seem to reproduce the bug but it does seem as if the default value should be LANGUAGE_NONE instead of NULL. Could you manually hack your copy to say LANGUAGE_NONE in group_pathauto_update_alias and post results here?
Also: Could you tell me how to reproduce the bug on a clean install? I need to verify the fix before committing it :)
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedThis on fresh drupal install, on localhost:
1-Install last version of Drupal 7 (7.34).
2-Enable Group,Pathauto,Entity API, Entity Tokens and Token Modules.
3-Create Group with "Generate automatic URL alias" checked.
4-The url alias generated in admin/config/search/path is group/test, because the title of the group is "test" and the token is the default group/[group:title].
5-Go to group/test instead of group/1 url and we have "Page not found".
With LANGUAGE_NONE instead of NULL, this and the other problems related seem totally solved.
The result of group_pathauto_update_alias in save() with NULL is this:
Instead with LANGUAGE_NONE is this:
Comment #5
kristiaanvandeneyndeHi there, sorry for the late reply. I was out skiing for a week :)
Thanks for the detailed report, I'll try to verify and fix this as soon as possible.
Comment #6
kristiaanvandeneyndePatch attached, if light goes green and simplytest.me shows the error is gone, I'll commit it.
Comment #7
kristiaanvandeneyndeWorks, so committed.