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

Comments

Stevel’s picture

Status: Active » Needs review
StatusFileSize
new1.97 KB

Here'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.

Status: Needs review » Needs work

The last submitted patch, 865946-save-node-language-neutral.patch, failed testing.

MaxWesten’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 865946-save-node-language-neutral.patch, failed testing.

MaxWesten’s picture

Version: 7.x-dev » 7.8
Status: Needs work » Needs review
StatusFileSize
new1.72 KB

Quickly rerolled a patch against Drupal 7.8

Status: Needs review » Needs work

The last submitted patch, 865946-language_neutral-patched_against_7-8.patch, failed testing.

Version: 7.8 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.