To reproduce this bug:
- Translation module enabled and add the foo language, and make it the default language.
- Select English as language in your profile.
- Create a content type with 'Multilingual support' disabled
- Create a node with an alias
- Try to surf to the newly created node using the alias
Result:
'Page not found' error
Expected result:
The node is displayed
Cause:
When a node is saved, but multilingual support is disabled, the node is saved with the default language foo. This causes the alias to be saved with the language foo as well.
When looking up the path, the alias is searched with the current language (english) and with LANGUAGE_NONE. Both are not found.
Proposed fix:
When a node is saved for a type without multilingual support, use LANGUAGE_NONE as the language for the node
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 865946-language_neutral-patched_against_7-8.patch | 1.72 KB | MaxWesten |
| #1 | 865946-save-node-language-neutral.patch | 1.97 KB | Stevel |
Comments
Comment #1
Stevel commentedHere's a patch for it. LANGUAGE_NONE (language neutral) is also the default setting when a node is created for which 'Multilingual support' is enabled, so it makes sense to do so when multilingual support is not enabled.
Comment #3
MaxWesten commented#1: 865946-save-node-language-neutral.patch queued for re-testing.
Comment #5
MaxWesten commentedQuickly rerolled a patch against Drupal 7.8