Problem

When site supports at least two different languages content can have assigned language.
With current version of path.inc / drupal_lookup_path it is impossible to open English nodes when user has selected Polish language (for example).

Steps to reproduce.
1. Create a node with language set to English with path like example.com/pages/en/test-me
2. Select different language (for example Polish)
3. Browse site so language is not added as parameter to URL anymore (it's hidden in session)
4. While having non-English language selected:
5. Open once more original address: example.com/pages/en/test-me
6. Result: content not found

Proposed resolution

Node should be found even if there is no translation for it in a selected language - if user provides correct URL.

You can use attached patch for fixing this error.

There are two places fixed:
- fetching alias by language - if not found, reads again without language specified
- reading from cache - after patch reads additionally cache using "undefined" language (I'm not sure about this part)

Please let me know if it can be done without patching Drupal's core - using some kind of hook maybe?

CommentFileSizeAuthor
path.inc_.diff2.02 KBvpiotr
Support from Acquia helps fund testing for Drupal Acquia logo