Some time ago, I created a page, gave it a custom path alias 'chata'. Locale was off, so no language was specified.
Today I switched locale on for the first time.
I edited that page, changed the language (because it is in Slovak), saved.
From then on I could not access my page at /chata. I tried editing the page and saving it (the path was there in its field as it should be), but I was always getting an error message. When listing in views, I saw that page had only the /node/nid address, while other pages (without adjusted language) successfuly used their paths.
I then edited the page again and changed the language to 'English' (default language on that site). Now it works.
So the bug is that I cannot set a path alias on a page that has a different language than default/English.
Comments
Comment #1
saml commentedI have experienced the same problem. I have so far localized my problem to the i18n synchronization module. When either inactivating the module, or inactivating all synchronizations settings for the relevant content type, the problem was gone. Does this help for you too?
I'm investigating this further.
Comment #2
vacilando commented@saml -- thanks for the idea but no, I don't have the i18nsync module switched on at all.
Comment #3
dave reidEven though locale.module was disabled, the node alias was automatically given the default language on your site (English perhaps?). You changed the language on the node, but the alias language didn't change, so you couldn't access it with the changed language. Try editing the alias on the admin/build/path page.
Comment #4
vacilando commentedDave, thanks for coming back on this. But there still is a problem. I did not explain it very well above. Forget the locale module switching on and off. Take this scenario which I've just tested in a fully patched current Drupal website:
Create a page. Leave language selector on default = English. Give it an alias, save. The page is available under the alias, OK.
Now edit the page. Change the language. Save. Drupal tries to go to the alias, but returns "Page not found".
When I look at /admin/build/path I can see that the alias points to the correct node/XXXXX and the language is the new language.
Interestingly - and I may not have noticed this before, there was an error msg like this:
user warning: Duplicate entry 'node/XXXXX-' for key 2 query: INSERT INTO path_redirect (source, redirect, query, fragment, language, type, last_used) VALUES ('node/XXXXX', 'MYALIAS', '', '', '', 301, 1265453193) in /MYPATH/includes/common.inc on line 3467.
Now edit the page again. Change language to the default one. Save. Page works again under the alias.
Let me know if anything remains unclear or need more info/other test.
Comment #5
mpegyna commentedWhat language have you set for your aliases in pathauto config at administer>site building>url aliases?
Comment #6
vacilando commented(I am not using the 'pathauto' module.)
As for what language appears in that location -- that's /admin/build/path and I've described it in my report #4 above.
Comment #7
drugget commentedDave Reid, thanks a lot.
admin/build/path - that works!
Comment #8
dpearcefl commentedis this still an active issue?
Comment #9
dpearcefl commentedComment #10
vacilando commentedAFAIK, yes. Try the scenario described in detail in #4 above.
Comment #11
dpearcefl commentedDo I can try to duplicate the issue, do you know if it exists in Drupal 6.22?
Comment #12
vacilando commentedYes, I've just tested it and I confirm it still does not work in Drupal 6.22.
Simple/clarified steps to reproduce the bug:
Create a page. Leave language selector on default = English. Give it an
alias, save. The page is available under the alias, OK.
Now edit the page. Change the language. Save. Go to the the URL you have created above (with the alias). You will get "Page not found".
Comment #13
dgastudio commentedsame here