Hello,
My website is using several non-English languages, therefore some titles contain letters with accents (é, ö, ç...). Pathauto use the page title to create nice URLs and keeps the accents in the URL. If I make a link to a node with a "nice URL" containing letters with accents, it won't be processed by Pathologic (the link will still display as "node/123" instead of "content/page-title").
I think I can circumvent the problem by forcing Pathauto to use ASCII-96 characters only and regenerating the aliases (1500+ pages...), but would support for URLs with non-ASCII characters be possibly added to Pathologic?
Apart from this this module is great!
Comments
Comment #1
Garrett Albright commentedI just looked over Pathologic's code again and I couldn't see anything that would stop it from working with non-ASCII characters, but perhaps I'm wrong. I'll try to do some experimentation over the weekend and see if I can get to the bottom of this. No need to break all of your current URLs just yet!
Comment #2
mdupontTaking a closer look at the issue (I was in a big rush trying to complete the content migration), it seems the problem is not with URL aliases with non-ASCII characters, as quite a few of them are working well, and creating test pages with a bunch of exotic characters as a title worked fine. In the contrary, some URL aliases containing only ASCII characters were broken.
I thought it could be related to language or content type settings, as the problem seems to affect primarily content in another language than English, but once more when making tests all is fine. Moreover, when changing either the title or the URL path (disabling Pathauto), even if the URL alias gets updated (it is in the URL aliases list in Drupal AND is in the url_alias table in the database) it is not possible to access the content using the URL alias (I get a "Page not found"), and that's why Pathologic is not able to convert "node/123" into "content/page-title". All caches are cleared an disabled. i18n and language settings are set to "display all content" and "no language negociation".
To sum up, some (and not all) content is accessible only by using the internal URL and their URL alias is not working although it do exists, even if we change or update the alias or the content. It seems to happen primarily to non-English content. And I have no idea of which module is causing these aliases not to work, and why some are working and some other aren't.
Comment #3
mdupontOK, I think the problem is spotted : URL aliases are not working if a node has no default language version (currently English) and is not Language neutral, although it shows up with the internal URL, as in the i18n settings I checked to display "All content. No language conditions apply." without path prefix.
Basically, if you default language is set to English :
- you create a node in "Language neutral" -> the URL alias works
- you create a node in English -> the URL alias works
- you create a node in English then translate it to another language -> the URL alias works only for the English version
- you create a node in another language than English and with no translation, or your trying to access a translation in another language than English -> the URL alias doesn't work
In my case some URL aliases were working for non-English content because they were mistakenly set as "Language Neutral" when creating the node.
I think the problem is related to the core Path module, so I'll report the bug there.
Comment #4
Garrett Albright commentedHmm, interesting. Good work on working that all out. Frankly, I didn't make time this weekend to check this out like I promised I would…
Comment #5
mdupontI reopen the issue after tracking the situation at http://drupal.org/node/347265
I've changed some of my settings to use path prefixes for languages. My site's default language is still English.
The good news is that all content is now accessible through an URL alias. For example, all my Spanish content is available at http://mysite.tld/es/url-alias.
The bad news is that if I make a link to a Spanish page from an English page (linking to the NID), Pathologic won't convert "node/123" into "content/page-title".
A little schema :
Comment #6
mdupontHmmm, finally it definitively looks like a Pathologic-related issue since other modules are displaying URL aliases correctly.
Test case you can easily recreate when using i18n module:
Do you confirm the behavior? Is that a compatibility issue with i18n module?
Comment #7
mdupontComment #8
mdupontIt definitely comes down the way localized url aliases are managed in Drupal core. I'm closing this issue, one could track the issue on #347265: URL aliases not working for content not in default language
Comment #9
Garrett Albright commentedHmm. Okay, that's a relief, because I really am clueless as to how multilingual sites work. Thanks for your persistence.