Wrong PREFERRED LANGUAGE (code) on simplenews-subscriber-form

Created on 17 October 2020, about 4 years ago
Updated 16 May 2024, 6 months ago

Problem/Motivation

simplenews-subscriber-form (EDIT subscriber) (not registered as user) form get lang-code (defaultLangcode) but not actual (stored in DB table=simplenews_subscriber>langcode)

Proposed resolution

/simplenews/src/Form/SubscriberForm.php

      else {
        $form['language']['langcode'] = [
          '#type' => 'select',
/*WT+: form simplenews-subscriber-form get actual lang-code*/
          //'#default_value' => $subscriber->language()->getId(),
          '#default_value' => $subscriber->langcode->value,
/*<<<*/
          '#options' => $language_options,
          '#required' => TRUE,
        ];
      }
    }

    return $form;
  }
πŸ› Bug report
Status

Closed: outdated

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024