What I did:
- Default 6.0-rc3 install
- enabled Locale and Content Translation modules
- created new language: hu ("Magyar")
- on admin/settings/language/configure selected "path prefix only" and set path prefixes to languages: "en" and "en"
- tried to create a menu link on Primary links with path "hu" and drupal refused it with this error:
The path 'en' is either invalid or you do not have access to it.
Comments
Comment #1
edgarpe commentedSorry, I messed up the 'en' and 'hu' words a bit, but the point is that one can not create a menu link to language paths.
Comment #2
catchThere were similar issues with path aliases before, this one looks fairly critical to me. Feel free to demote if you disagree.
Comment #3
catchComment #4
pwolanin commentedUnlike D5, D6 validates that a path is valid.
I'm not sure how the path prefixing works in D6 core - using language_url_rewrite()?
Comment #5
pwolanin commentedlooks like to set a specific language for a link, you need to set
$item['options']['language']One approach would be to add a new field to the menu module form?
http://api.drupal.org/api/function/menu_edit_item/6
Otherwise we'd need to alter this function:
http://api.drupal.org/api/function/menu_edit_item_validate/6
to look for a language prefix.
Comment #6
gábor hojtsyMenus are not language aware in Drupal 6 by default. i18n or localizer module will help you make your menus language aware either by simple things like adding a language option to forms or swapping menus by languages. Otherwise this is a feature missing in Drupal 6. It would be great to fill in this gap in Drupal 7!
Comment #7
panchoI understand that this feature has been postponed to D7. IMHO it is a big mistake that we didn't postpone the final release of D6 instead, until the translation functionality has been completed. This way we ruin our D6 killer feature.
I'm expecting TONS of support requests, forum posts and complaints on this, if we don't add a short information (including links to i18n and localizer modules) on admin/settings/language/configure, admin/build/menu-customize/navigation/add and any other places where the missing features make Drupal look broken.
The absolute minimum would be to give the user this information in the respective error messages instead of misleading errors like "The path 'en' is either invalid or you do not have access to it."
This is just my personal opinion on this. I know it's (too) late and I don't want to offend anyone, but I think that it is going to be a huge problem.
Comment #8
gábor hojtsyWe stopped developing i18n features for core months ago (around half a year ago) when the feature freeze was in. So adding i18n features now would be quite shocking timing.
Comment #10
jwilson3From a purely functional and usability standpoint, this issue is a bug rather than a feature in that if a language path-prefix really exists in a drupal install, then then adding a menu item to the language specific homepage should Just Work. Is there _really_ no way this can be fixed in D6????
Comment #11
sun.core commentedThere's not even a patch here and this bug exists since D6. If you can come up with a patch until 15th, fine, if not => D8.
Comment #12
nedjoComment #13
marcvangendI am a bit surprised that I haven't run into this problem before, and that this issue has been sitting here for almost four years with very little activity.
I'm willing to put some time in this... it looks as if a fix would require a patch for menu_edit_item_validate, is that correct?
Comment #22
quietone commentedI tested this on Drupal 9.3.x, standard install, with added language of Italian. I was able to create menu links in Italian without any error messages.
Therefore, closing as cannot reproduce. If you are experiencing this problem reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").
Thanks!