Recently Pathauto added a way for hierarchy tokens like 'foo/bar/baz' to have the single segments cleaned separately. We need to support this behavior.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | i18nmenu_node-926130-1.patch | 2.68 KB | plach |
Recently Pathauto added a way for hierarchy tokens like 'foo/bar/baz' to have the single segments cleaned separately. We need to support this behavior.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | i18nmenu_node-926130-1.patch | 2.68 KB | plach |
Comments
Comment #1
plachThe attached patch deprecates the
[i18n-menuhierarchy-raw]token in favor of the new[i18n-menupath-raw]. The latter conforms to the new standard form introduced by Token and Pathauto in #881270: [bookpath], [menupath], [*path] tokens not cleaned: aliases without punctuation removed, lower casing, etc., to trigger the segment cleaning mode.Comment #2
plachCommitted to HEAD.
Related issue: #967622: Remove [i18n-menuhierarchy-raw] token before 1.0 release.
Comment #3
spuky commentedHi this patch is not working as expected... i fixed the path issue myself but was to bussy to write a clean patch... (as you did with hint in the instal file...and so on...)
So here are the things that need to be diffrent..
1 when submitting menpath tokens we are suposed to aply pathauto_cleanstring
2 and the token has still to be submitted as 1 string...
since I got no cvs installation on the site I merged my changes with your patch.. and am still rather bussy here is a working version of the i18nmenu_node_token_values function.
If the token will be used as a path the pathauto_cleanstring is applied in any cast the output is a single string...
Comment #4
plachSorry, but I absolutely don't get what's wrong with the committed patch, you should provide more information about it. Looking at the alternative code you posted I assure you it's not the way the latest stable versions of Pathauto and Token are meant to work. See pathauto.inc (lines 568-574) and token_node.inc (lines 75-83) for reference.
Comment #5
spuky commentedSorry for the confusion I hadn't updated token (since 1.5 was not there) when I wrote my code and did not when trying your patch this morning...
your patch is working fine after updating to token 6.x-1.5
Sorry
Comment #6
plachRelated issue: #969840: Show requirements in the status report page.