\Drupal\language\LanguageNegotiator
updateConfiguration()
LanguageNegotiationUI::METHOD_ID has gone away :-
foreach ($language_types_info as $type => $info) {
$configurable = in_array($type, $types);
// Check whether the language type is unlocked. Only the status of
// unlocked language types can be toggled between configurable and
// non-configurable. The default language negotiation settings, if
// available, are stored in $info['fixed'].
if (empty($info['locked'])) {
// If we have a non-locked non-configurable language type without
// default language negotiation settings, we use the values negotiated
// for the interface language which should always be available.
if (!$configurable && !empty($info['fixed'])) {
$method_weights = array(LanguageNegotiationUI::METHOD_ID); <-- this line
$method_weights = array_flip($method_weights);
$this->saveConfiguration($type, $method_weights);
}
}
This issue seems a good starting point for someone at DRUPALCON.
I will be on #drupal-contribute if anyone needs a hand.
Comments
Comment #1
martin107 commentedComment #2
rpayanmComment #3
rpayanmComment #4
martin107 commentedThis looks like the correct fix, it is certainly in keeping with the comments is the code block (see the issue summary.)
RTBC++
I don't want to RTBC an issue I started, so I will find someone to trade reviews with.
For a one line change, I think a Quick Fix tag might be appropriate.
Comment #5
martin107 commentedI want to summaries a comment received via IRC
SpadXIII pointed out that the array_flip was over complex for a array defined by only the line above.
This is true and could be reworked, but I think this is a minor tidy, and this style choice is best left to the original coder.
This is a bug fix because, with currently an undefined constants, we in effect slip in a NULL into the saved configuration without error....
a topic for another issue.
Comment #6
spadxiii commentedAfter applying the patch, my editor doesn't complain about a missing class anymore.
Comment #7
alexpottCommitted 59b003a and pushed to 8.0.x. Thanks!
Comment #9
patrickd commentedcorrecting amsterdam tag
Comment #11
rpayanm