Quantcast
Channel: Issues for Drupal core
Viewing all 298113 articles
Browse latest View live

Seven theme fieldset-legend not clickable in Chrome 103.0.5060.53

$
0
0

Problem/Motivation

In the Seven theme, the fieldset-legend accordions have become unclickable / expandable in Google Chrome 103.0.5060.53.

Steps to reproduce

Windows 10
Google Chrome 103.0.5060.53
Drupal 7.88

Navigate to a page with fieldset-legend accordions such as /admin/config/people/accounts/display and note that the element doesn't expand when clicked.

Proposed resolution

Modify /themes/seven/style.css fieldset .fieldset-legend block and add z-index:1

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet


Execute hook_block_view_alter when placing blocks with layout builder

$
0
0

Problem/Motivation

Hook block alter does not execute for blocks that have been placed in Layout builder which means layout builder displays blocks incorrectly without their alters from contrib.

Here's an example where layout builder not firing expected hooks has broken Easy Breadcrumb:

https://www.drupal.org/project/easy_breadcrumb/issues/3292422

Steps to reproduce

Install easy breadcrumb and place the block through layout builder. Then check the site for JSON LD

You can also replicate this by adding hook block alter to any block and then placing that block through layout builder.

Proposed resolution

Execute hook block alter for blocks placed in layout builder.

Remove unneeded \Drupal\Tests\filter\Kernel\TextFormatElementFormTest::getUrl()

$
0
0

Problem/Motivation

Looks like \Drupal\Tests\filter\Kernel\TextFormatElementFormTest::getUrl() is unneeded.

The simpletest bit in the comment kinda gives it away already:

    // \Drupal\simpletest\AssertContentTrait needs this for ::assertFieldByName
    // to work.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Menu link URL should be translatable

$
0
0

Problem/Motivation

Menu link URLs are not translatable. This is a problem regarding external URLs. Currently the only solution seems to be making a duplicate menu for the other language.

Proposed resolution

Make menu link URL translatable.

Autocomplete throbber not positioned correctly

Remove unused ExceptionTestSiteSubscriber

$
0
0

Problem/Motivation

\Drupal\Core\EventSubscriber\ExceptionTestSiteSubscriber::on500() has a todo:

   * @todo The $headers array appears to not actually get used at all in the
   *   original code. It's quite possible that this entire method is now
   *   vestigial and can be removed.

The method builds a $headers array then does nothing with it.

Steps to reproduce

Proposed resolution

Remove the entire event subscriber.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Composer v2.2 prompts to authorize plugins

$
0
0

Problem/Motivation

Composer v2.2 includes a new security feature https://getcomposer.org/doc/06-config.md#allow-plugins

As of Composer 2.2.0, the allow-plugins option adds a layer of security allowing you to restrict which Composer plugins are able to execute code during a Composer run.

As a result of that update, without an implicit config setting in composer.json, commands including composer create-project drupal/recommended-project drupal9 and composer update will not complete running until the user replies y multiple times during the operation.

Creating a "drupal/recommended-project" project at "./drupal9"
Installing drupal/recommended-project (9.3.0)
  - Installing drupal/recommended-project (9.3.0): Extracting archive
Created project in /var/www/html/testy/drupal9
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 62 installs, 0 updates, 0 removals
  - Installing composer/installers (v1.12.0): Extracting archive
composer/installers contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "composer/installers" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
  - Installing drupal/core-composer-scaffold (9.3.0): Extracting archive
drupal/core-composer-scaffold contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "drupal/core-composer-scaffold" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
  - Installing drupal/core-project-message (9.3.0): Extracting archive
drupal/core-project-message contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "drupal/core-project-message" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y

Steps to reproduce

Using composer v2.2 and above, run composer create-project drupal/recommended-project drupal9 or composer update.

Proposed resolution

Add the new required config setting to Drupal core's composer.json

"config": {
    "sort-packages": true,
    "allow-plugins": {
        "composer/installers": true,
        "drupal/core-composer-scaffold": true,
        "drupal/core-project-message": true
    }
},

This update should be ported to all Drupal core versions.

(It also affects installation of Drupal 8 with Composer 2.2, but since Drupal 8 is EOL, I am not sure if this update would happen)

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Allow kernel tests to fail or expect logged errors

$
0
0

Problem/Motivation

Sometimes, a system will log an error and carry on functioning, because that's the best thing to do in normal operation.

But in a test, the logged error is invisible, and we might want a test to either a) fail on an error, because something's gone wrong in the test, or b) expect the error, because we want to actually test the conditions that cause an error.

Examples of this include:

- The cron service catches exceptions thrown by hook_cron() implementations, logs them, and then continues as normal
- The queue runner catches exceptions thrown by queue workers, logs them, and then continues as normal

Proposed resolution

Add a way for tests to react to logged errors. It should be up to individual tests:

- whether to opt in to being aware of logs
- to fail a test if a log of specified type, of specified or greater severity, is generated
- to fail a test if a log of specified type is not generated

1. To keep the scope tight, this issue is focused on kernel tests as exceptions in the SUT in functional tests are significantly more complex to handle.
2. We create a new AssertableLogger class and register this as a logger, intead of registering the test itself as a logger, to reduce the surface area of KernelTestBase.
3. We created a LoggingTrait to use in KernelTestBase to facilitate future use in other kinds of tests, like functional tests or contrib ExistingSite tests.
4. We don't throw an expection immediately when a log is generated, as this might be swallowed by th SUT. Instead we store logs and evaluate them at the end of a test's execution.
5. To keep the scope tight, we do not opt in to expecting no logged errors in KernelTestBase, this will be explored in a follow-up issue.

User interface changes

None.

API changes

None.

Data model changes

None.


Make buildBundleFieldDefinitions use Bundle Classes for building bundleFieldDefinitions

$
0
0

Problem/Motivation

With Drupal 9.3.x came the very useful addition of Bundle Classes.

When I jumped into using this new feature, the Bundle Classes seemed like the perfect place to provide bundle specific field definitions via the bundleFieldDefinitions method, as all variations of bundle fields could live in their own class.

However, the buildBundleFieldDefinitions method on the EntityFieldManager responsible for building the list of bundle specific field definitions does not use Bundle Classes and will only ever try to call bundleFieldDefinitions on the base Entity class, meaning that you cannot define bundle specific fields in the Bundle Class.

Steps to reproduce

Create a Bundle Class as per the documentation and add a method of bundleFieldDefinitions to it. This method is never called and so any field definitions returned for it are never registered.

Proposed resolution

Modify the buildBundleFieldDefinitions method to check for and use a Bundle Class for locating bundleFieldDefinitions before falling back to the Entity Class as default.

Remaining tasks

Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

Throw an exception when Router::generate() is called

$
0
0

Problem/Motivation

In an effort to reduce the number of ways to generate a link, we deprecated calling Router::generate() in Drupal 8.3.0

Last time we tried to remove it, we realised we couldn't because it was on RouterInterface, so we said it will start throwing an exception in Drupal 10.

  /**
   * {@inheritdoc}
   */
  public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH): string {
    @trigger_error(__METHOD__ . '() is deprecated in drupal:8.3.0 and will throw an exception from drupal:10.0.0. Use the \Drupal\Core\Url object instead. See https://www.drupal.org/node/2820197', E_USER_DEPRECATED);
    return $this->urlGenerator->generate($name, $parameters, $referenceType);
  }

I think we need to remove the @inheritdoc, add a @throws, and then have an exception message which tells people to use the Url object instead.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

locale_translation_build_projects() function comment is outdated

$
0
0

Problem/Motivation

https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/modules/loca...

See http://drupalcode.org/project/drupalorg.git/blob/refs/heads/7.x-3.x:/drupalorg_project/plugins/release_packager/DrupalorgProjectPackageRelease.class.php#l219

This url has been changed, the class file is here currently:

https://git.drupalcode.org/project/drupalorg/-/blob/7.x-3.x/drupalorg_project/plugins/release_packager/DrupalorgProjectPackageRelease.class.php

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Missing space between message and link in empty listing view

$
0
0

A very minor thing, I know. There is a space missing on the /admin/structure/block/block-content/ page in the sentence "There are no custom blocks available.Add a custom block."if there aren't any blocks added. Should be a space in between the two sentences.

The two sentences are put together in the core files
/core/modules/block_content/config/optional/views.view.block_content.yml
and
/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php

I'm guessing there should be a better solution than to simply add a "" or a   at the end of the line in views.view.block_content.yml. If there isn't, and someone with better knowledge of Drupal core acknowledges that that is a viable solution, I could make a patch to make the work easier.

The "error" is visible in Drupal 8.7.8 and 8.7.10 as well.

PHP Notice logged when switching "Configuration type" in single configuration export screen

$
0
0

Problem/Motivation

PHP Notice logged when switching "Configuration type" with already selected "Configuration name" in single configuration export screen at /admin/config/development/configuration/single/export.

The PHP Notice in all its "glory":

Notice: Undefined index: #value in template_preprocess_textarea() (line 389 of /web/core/includes/form.inc)

#0 /web/core/includes/bootstrap.inc(312): _drupal_error_handler_real()
#1 /web/core/includes/form.inc(389): _drupal_error_handler()
#2 /web/core/lib/Drupal/Core/Theme/ThemeManager.php(287): template_preprocess_textarea()
#3 /web/core/lib/Drupal/Core/Render/Renderer.php(436): Drupal\Core\Theme\ThemeManager->render()
#4 /web/core/lib/Drupal/Core/Render/Renderer.php(449): Drupal\Core\Render\Renderer->doRender()
#5 /web/core/lib/Drupal/Core/Render/Renderer.php(201): Drupal\Core\Render\Renderer->doRender()
#6 /web/core/lib/Drupal/Core/Render/Renderer.php(145): Drupal\Core\Render\Renderer->render()
#7 /web/core/lib/Drupal/Core/Render/Renderer.php(578): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#8 /web/core/lib/Drupal/Core/Render/Renderer.php(146): Drupal\Core\Render\Renderer->executeInRenderContext()
#9 /web/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php(66): Drupal\Core\Render\Renderer->renderRoot()
#10 /web/core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php(89): Drupal\Core\Render\MainContent\AjaxRenderer->renderResponse()
#11 /web/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php(109): Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse()
#12 [internal function]: Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->onException()
#13 /web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#14 /vendor/symfony/http-kernel/HttpKernel.php(219): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#15 /vendor/symfony/http-kernel/HttpKernel.php(91): Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
#16 /web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle()
#17 /web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle()
#18 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#19 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#20 /vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php(49): Drupal\page_cache\StackMiddleware\PageCache->handle()
#21 /web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Asm89\Stack\Cors->handle()
#22 /web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#23 /vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#24 /web/core/lib/Drupal/Core/DrupalKernel.php(716): Stack\StackedHttpKernel->handle()
#25 /web/index.php(19): Drupal\Core\DrupalKernel->handle()
#26 {main}

Steps to reproduce

  1. Go to /admin/config/development/configuration/single/export
  2. Select some value in the select dropdown "Configuration type"
  3. Select some value in the select dropdown "Configuration name"
  4. Select some other value in the select dropdown "Configuration type"
  5. PHP Notice happens
  6. Optional start of The Apocalypse

Proposed resolution

I think this is all caused by the select dropdown "Configuration name"not being "reset" to a "neutral/none" value when switching "Configuration type"

Remaining tasks

The regular ol' 4 P's:

Patch/create MR
Poke at patch (aka Review)
Push to latest dev-branch (aka Commit)
Party

User interface changes

API changes

Data model changes

Release notes snippet

The comments heading should not be displayed on node pages in Olivero when no comments have been posted

$
0
0

Problem/Motivation

When you have a content type that allows commenting, nodes with no comments posted show the “Comments” heading.

In my opinion, this heading should only be present when there are comments, as this is more logical and provides for a cleaner page layout.

Steps to reproduce

1. Have a content type configured to allow comments.
2. Have Olivero as the default theme.
3. Navigate to a node from the content type which has no comments.
4. Compare this to a node that does have comments.

Proposed resolution

Make the following changes to olivero/templates/field/field--comment.html.twig

Before:

  {% if not label_hidden %}
    {{ title_prefix }}
    <h2{{ title_attributes.addClass('comments__title') }}>
      {{- label -}}
      {%- if comments -%}
        <span class="comments__count">{{ comment_count }}</span>
      {%- endif -%}
    </h2>
    {{ title_suffix }}
  {% endif %}

After:

  {% if comments and not label_hidden %}
    {{ title_prefix }}
    <h2{{ title_attributes.addClass('comments__title') }}>
      {{- label -}}
      {%- if comments -%}
        <span class="comments__count">{{ comment_count }}</span>
      {%- endif -%}
    </h2>
    {{ title_suffix }}
  {% endif %}

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Update phpstan/phpstan and mglaman/phpstan-drupal to latest versions

$
0
0

Problem/Motivation

phpstan/phpstan 1.8.0 is out and gives some performance improvement. However, per https://github.com/phpstan/phpstan/releases/tag/1.8.0

Analysed code is no longer executed, except for files referenced in bootstrapFiles and files sections in Composer autoload configuration

this means that constants defined via define() no longer are scanned, and that our PHPUnit-Bridge version dance confuses PHPStan so we need to replicate that dance in a bootstrap file for PHPStan.

Also mglaman/phpstan-drupal has a new version released.

Moreover it's required to parse PHP 8.2 attributes https://wiki.php.net/rfc/deprecate_partially_supported_callables

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Replace REQUEST_TIME in procedural code

$
0
0

Problem/Motivation

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Claro datetime range min/max-width

$
0
0

Claro datetime range min-width is causing "empty" fields (containing dd/mm/yyyy placeholder) to be wider than filled fields. See image.

Added this.
max-width: 11rem; /* Prevent empty input to be wider than filled input. */

See patch for details.

Non clicable links in logs page

$
0
0

Problem/Motivation

It is not possible to filter and clean in the logs tab, both links are not clickable.

Steps to reproduce

Drupal: 7.90
Open Chrome 103.0.5060.53
Got to drupal page "Recent log messages"
Try clicking link "Filter log messages" - not clickable

After link hover mouse is not changin to hand cursor.

If we change html height to ex.:30px, link will be clickable

Select's #empty_option gets removed on ajax callback

$
0
0

Problem/Motivation

It was discovered in #2577219: Single item configuration export form config_name does not have "- Select -" as it's first option that select element adds #empty_option in Select::processSelect. However, if a select element is updated (re-rendered?) on an ajax callback, the #empty_option gets removed.

Steps to reproduce

Create a form with the following in buildForm

  $form['ajax_parent_select'] = [
      '#title' => $this->t('Parent select with Ajax callback'),
      '#type' => 'select',
      '#options' => ['one' => 'One', 'two' => 'Two'],
      '#default_value' => 'one',
      '#ajax' => [
        'callback' => '::ajaxCallback',
        'wrapper' => 'child-wrapper',
      ],
    ];
    $form['ajax_child_select'] = [
      '#title' => $this->t('Child select'),
      '#type' => 'select',
      '#options' => ['three' => 'Three'],
      '#empty_option' => $this->t('- Select -'),
      '#prefix' => '<div id="child-wrapper">',
      '#suffix' => '</div>',
    ];

Where ajaxCallback looks something like this

  public function ajaxCallback($form, FormStateInterface $form_state) {
    $options = [
      'one' => ['three' => 'Three'],
      'two' => ['four' => 'Four'],
    ];
    $form['ajax_child_select']['#options'] = $options[$form_state->getValue('ajax_parent_select')];
    return $form['ajax_child_select'];
  }

When ajaxCallback fires, it removes #empty_option during re-rendering of ajax_child_select

This has been demonstrated here

Proposed resolution

Add #empty_option in a #pre_render callback

Remaining tasks

Provide patch to fix the issue.

Write a test to prevent regression.

Code review and validate the used approach.

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None

Uncaught RfcComplianceException thrown when sending email from a site whose name in Arabic language

$
0
0

Problem/Motivation

After the upgrade to 9.2.x sites with Arabic site name began to WSoD with uncaught exceptions when they send emails:

Symfony\Component\Mime\Exception\RfcComplianceException: Email "=?UTF-8?B?PT91dGYtOD9RPz1EOD1BNz1EOD1BQT1EOD1CNF89RDg9QTI9RDk9ODY9RDg9QUY=?= =?UTF-8?B?Xz89DQogPT91dGYtOD9RPz1EOD1BNz1EOT04NV89RDg9QTc9RDk9ODQ9RDk9ODM=?= =?UTF-8?B?PUQ5PTg4PUQ5PThBPUQ4PUFBPz0gPG5vLXJlcGx5QGt3LmhtLmNvbT4=?=" does not comply with addr-spec of RFC 2822. in Symfony\Component\Mime\Address->__construct() (line 56 of /app/vendor/symfony/mime/Address.php).

Drupal 9 contains few changes to make the site name RFC compliant
https://git.drupalcode.org/project/drupal/-/commit/cb266b8932c690ecdee10...

This works fine for english text "createPhrase" method of /vendor/symfony/mime/Header/AbstractHeader.php is having below condition

public const PHRASE_PATTERN = '(?:(?:(?:(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?[a-zA-Z0-9!#\$%&\'\*\+\-\/=\?\^_`\{\}\|~]+(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?)|(?:(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?"((?:(?:[ \t]*(?:\r\n))?[ \t])?(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21\x23-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])))*(?:(?:[ \t]*(?:\r\n))?[ \t])?"(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?))+?)';
if (!preg_match('/^'.self::PHRASE_PATTERN.'$/D', $phraseStr)) {

}

Which considers English as valid text and does not encode it but in case of Arabic site name it tries to encode the site name;

from encodeString method of /vendor/symfony/mime/Encoder/QpEncoder.php.
Which causes the issue.

Steps to reproduce

1. Create a vanilla install of Drupal 9.
2. Set the site name in Arabic language.
4. Visit /user/password and attempt to send yourself a password reset email. or user/register

Viewing all 298113 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>