\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.

CommentFileSizeAuthor
#3 CONSTANT-needs-updating-2347659-3.patch629 bytesrpayanm

Comments

martin107’s picture

Title: CONSTANT need updating » CONSTANT needs updating.
rpayanm’s picture

Assigned: Unassigned » rpayanm
rpayanm’s picture

Status: Active » Needs review
StatusFileSize
new629 bytes
martin107’s picture

This 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.

martin107’s picture

I 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.

spadxiii’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quickfix

After applying the patch, my editor doesn't complain about a missing class anymore.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 59b003a and pushed to 8.0.x. Thanks!

  • alexpott committed 59b003a on 8.0.x
    Issue #2347659 by rpayanm | martin107: Fixed CONSTANT needs updating.
    
patrickd’s picture

Issue tags: -#amsterdam2014 +Amsterdam2014

correcting amsterdam tag

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rpayanm’s picture

Assigned: rpayanm » Unassigned