Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
path.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Aug 2011 at 10:29 UTC
Updated:
29 Jul 2014 at 19:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
catchCould we do #access => module_exists('locale'); maybe? That way any other form alter on this doesn't need to take into account whether locale module is enabled or not - structure will be the same.
Comment #2
gábor hojtsy@catch: how do you call locale_language_list('name') then? module_invoke()? That sounds like would present a separate language list if locale is not there, and could result in validation failures (the possible options would not have the selected language, but you cannot change it)?
Comment #3
catchhmm, fair enough. I had meant to mark this CNR from active anyway.
It'd be good if we could come up with a better pattern than module_exists() for stuff like this, really dislike that function, but obviously not for this issue.
Comment #5
franzYou probably meant '#default_value' => $path['language'], is that so?
Comment #6
gábor hojtsyYes, that seems to be bad-copy-paste. Can you help with a fixed patch? :)
Comment #7
franzJust wanted to check. That should do it.
Comment #8
gábor hojtsyLooks better, thanks :)
Comment #9
David Lesieur commentedChecked the code, played with it on a test site, looks good.
Comment #10
tarmstrong commentedJust wanted to link this issue to #1280996: New language_select element type for form API which is hopefully using the general idea of this patch to create a language_select element in more places in Core.
Comment #11
dries commentedCommitted to 8.x. Thanks. Marking 'fixed'.
Comment #12
gábor hojtsyThanks, we'll continue abstracting this out in #1280996: New language_select element type for form API. People interested please go there.