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

Decide how Twig filters should process against an array of render arrays

$
0
0

Problem/Motivation

This issue arrises from #3301853: Create twig filters: |add_class and |set_attribute, where there is discussion on how the |add_class filter should work when it runs into an array of render arrays.

From @pdureau

I am afraid it will not work because the themers don't know if the renderable they print is a single render array or a list of them.

For example, without talking about those new filters, because a list of renderable is also a renderable, it is already safer for themers to print directly the variable:

From @lauriii

Thanks for the feedback @pdureau! That seems like a valid use case, but OTOH we don't generally apply filters across child elements like what you are proposing. I'm wondering if this could be handled on the render array level by introducing a new type that allows inheriting properties to children?

Something like this:

[
  '#type' => 'inherit',
  '#attributes' => ...
  [
    '#type' => 'custom_button',
    '#label' => 'Hello',
  ],
  [
    '#type' => 'custom_button',
    '#label' => 'Hello',
  ]
]

I guess there could be other ways to create similar functionality. I'm not too keen to what I'm proposed here so if someone has better ideas, I'd be open to that.


Remove remaining uses of FormattableMarkup in kernel test assertions

$
0
0

Problem/Motivation

There is no need to use FormattableMarkup to produce message strings in PHPUnit assertions; it is cleaner and easier in almost all cases to use simple string interpolation instead.

Steps to reproduce

Proposed resolution

Replace all uses of FormattableMarkup in kernel test assertions with either plain string interpolation, or remove the assertion message entirely when the assertion is obvious and the message does not add any context.

Keep FormattableMarkup at:

  • tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php (single comment)
  • tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php (markup tests)
  • tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php (markup tests)
  • tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php (test FormattableMarkup)

Remaining tasks

1) Command to search code base

grep FormattableMarkup -r -l | grep Kernel

2) Decide if FormattableMarkup should be removed from:

  • tests/Drupal/KernelTests/AssertContentTrait.php
  • modules/system/tests/src/Kernel/Theme/FunctionsTest.php

User interface changes

API changes

Data model changes

Release notes snippet

Datetime form element cannot validate when using a format without seconds

$
0
0

Problem/Motivation

When using a datetime form element that does not allow to input seconds as follow:

    $form['datetime_without_seconds'] = [
      '#type' => 'datetime',
      '#title' => $this->t('Datetime without seconds'),
      '#default_value' => new DrupalDateTime(),
      '#date_time_element' => 'text',
      '#date_time_format' => 'H:i',
    ];

And submitting the form without changing the value, we get a validation error.
It's caused by the \Drupal\Core\Datetime\Element\Datetime::valueCallback() method that adds ":00" to times that don't have seconds. The associated comment says "Seconds will be omitted in a post in case there's no entry." so I can't understand why it's been done.

Proposed resolution

Only add that seconds when the time format needs it.

Fix the logic in Datetime:valueCallback() for massaging input values so that DrupalDateTime::createFromFormat() does the actual work based on the format specified by the form element.

Remaining tasks

Contributor tasks needed
TaskNovice task?Contributor instructionsComplete?
Create a patchInstructionsDone
Update the issue summaryInstructionsDone
Add automated testsInstructionsDone
Manually test the patch NoviceInstructions
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standardsInstructions

User interface changes

None.

API changes

None.

Data model changes

None.

Make Package Manager more friendly to local development by allowing stages to operate directly on the codebase in some situations

$
0
0

Problem/Motivation

There are some cases where we would like people to be able to use Package Manager in a more permissive way than it currently allows. For the purposes of this issue, consider the use case of a simple local development setup (i.e., php -S) of Drupal CMS, being used by a marketer who is not technical and cannot be expected to ever look at a command line.

Package Manager requires Composer and rsync. Currently, those must be detectable in the PATH environment variable, or anything built on Package Manager will crap out with a nasty error. You can configure the paths to these executables in config, but you have to know how to do that (spoiler: it involves the command line, so we've already lost our theoretical non-technical user). That's being improved over in #3463662: When it is installed, Package Manager should try to detect the paths of Composer and rsync.

What if you don't have rsync, though? What if you don't even know what that is? You are completely prevented from installing modules into your site in a local environment, in which you are the only user, with Project Browser. You are, effectively, shut out of the Drupal ecosystem.

This is a mission-critical problem for Drupal CMS.

Proposed resolution

Let me begin by saying that Package Manager's default behavior will continue to be as it is now: sandbox everything.

But we will introduce two things here:

  • A new setting, package_manager_allow_direct_write. FALSE by default. This needs to be true for Package Manager to allow any StageBase subclass to operate on the live site directly.
  • A new attribute, #[Drupal\package_manager\Attribute\AllowDirectWrite] (no arguments), which a StageBase implementer can add to their StageBase subclass to signal Package Manager that, if the global setting is enabled, this stage is allowed to operate directly on the live site.

This means that Project Browser's StageBase subclass could declare that it is willing to operate on the un-sandboxed code base -- which makes sense for Project Browser, given its purpose and design -- but Automatic Updates could continue to be stringent, which makes more sense for it given its purposes and design.

API changes

A new setting and attribute. See above, or change record: https://www.drupal.org/node/3506770

Data model changes

None.

Release notes snippet

Not needed. Package Manager is alpha experimental.

Ajax.js commands stuck when adding JS with nomodule attribute

$
0
0

Problem/Motivation

(Note: this is a regression that affects 9.5+ and 10+)

When loading a script via ajax.js that has nomodule attribute, the command execution will get stuck.

With https://www.drupal.org/node/3293812, Drupal introduced a new add_js command. The implementation of the add_js command uses the loadjs library. The logic of this command adds the attributes defined for the script, for example in a xxx.libraries.yml file, before loadjs attempts to load the file.

If one of those attributes is nomodule (for example for a polyfill dependency), then the success or error callbacks from loadjs will never be called because the browser (any recent one) completely ignores the script and will not fire any onload, onerror or onbeforeload event that the loadjs listens to for that file.

That results in the counter used by loadjs to determine when to call the success/error callbacks, to not be decremented for this script and thus the callbacks are never called and the ajax.js add_js command promise is not resolved etc.

This is a regression from < 9.5 which had a different mechanism to load the javascript dependencies via ajax.

Steps to reproduce

The following code illustrates the issue at the loadjs level with a stripped down version of the logic from the add_js logic from the ajax.js file. The "success" callback is never called. Without the scriptEl.setAttribute('nomodule', ''); the script is loaded and the success callback is called.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Test Load JS</title>
</head>
<body>
  <script src="https://cdn.jsdelivr.net/npm/loadjs@4.2.0/dist/loadjs.min.js"></script>
  <script>
    loadjs(['https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2.4.8/dist/css-vars-ponyfill.min.js'], 'css-vars-ponyfill', {
      async: false,
      before: function(path, scriptEl) {
        console.log(path);
        scriptEl.setAttribute('nomodule', '');
        return false;
      }
    });

    loadjs.ready('css-vars-ponyfill', {
      success: function() {
        console.log('success');
      },
      error: function(depsNotFound) {
        console.log(depsNotFound);
      },
    });
  </script>
</body>
</html>

The effect can be seen on a fresh Drupal install following those steps (just for the sake of illustrating the problem):

  1. Spin up a new Drupal 9.5.x site
  2. Enable the "Block" module
  3. Edit the "core.libraries.yml" file and under drupal.collapse, replace the line misc/details-aria.js: {} with misc/details-aria.js: { attributes: { nomodule: true } }
  4. Clear the cache
  5. Go to /admin/structure/block, click a "Place block" button, in the popup, chose a block and click "Add block"
  6. With the nomodule change from (3) above, the content of the popup will not change to the block settings because the ajax command to update it will not be executed
  7. Just to confirm, remove the change from (3), refresh the cache and try again and this time the popup's content will be updated properly to go to the next step to add the block

Original proposed resolution

Note: This has been preceeded by newer proposal below

I'm not sure at which level (Drupal or Loadjs) the issue should be solved. It's not really a problem in loadjs (by default, it doesn't handle attributes to add to a script, those are added by the Drupal ajax.js logic).

I think the remediation could be in the ajax.js add_js logic with 2 options:

1. Do not load a file with the nomodule attribute
2. Or, do not add the nomodule attribute

All recent browsers support the nomodule attribute. The versions supporting this attribute match the Drupal browser requirements so option 1 would probably be fine.

See also https://www.drupal.org/project/drupal/issues/3181050 and https://www.drupal.org/project/drupal/issues/3263823

Note: skipping scripts with the nomodule attribute is also what jquery seems to do: https://github.com/jquery/jquery/pull/4282

Here's the issue in the loadjs repo, in case this should be fixed there: https://github.com/muicss/loadjs/issues/108

New proposed resolution

New path modifiers (module!& nomodule!) have been introduced in loadjs v4.3.0. Documentation on them can be found from loadjs's readme. I suppose these path modifiers could be used when loading JavaScript assets having respective attributes set. So, instead of assigning the attributes in the "before" callback/hook, we should use the new path modifiers for cases when loading module or nomodule JavaScript assets.

Remaining tasks

  1. [x] Decide where this should be solved
  2. [x] Support for type=module and nomodule in loadjs.js
  3. [ ] Patch ajax.js to take advantage of changes made in loadjs.js

Do not use select list for setting "cache maximum age" option

$
0
0

Problem/Motivation

This option is configured on "Performance" page.
/admin/config/development/performance

There is a couple UX issues with that widget.

1 . The number of options is limited. You are not allowed to set an arbitrary max-age value.
2 . The maximal allowed value is 1 day. Why is that? Drupal 8 has got tag-based cache system which is supposed to cache never-changing content forever.

Steps to reproduce

Browse to /admin/config/development/performance.
Try to set an arbitrary value.

Proposed resolution

Use a number input time this setting.

Remaining tasks

User interface changes

On /admin/config/development/performance, the "Browser and proxy cache maximum age" select input is replaced by a number input.
It accepts any integer greater than or equal to 0.

Introduced terminology

API changes

Data model changes

Release notes snippet

template_preprocess_views_view_summary_unformatted() does not set active link when using AJAX

$
0
0

Problem/Motivation

template_preprocess_views_view_summary_unformatted() tries to determine the active link based on the <current> route.
But when using AJAX, the current route is /views/ajax so no active link is set.

Steps to reproduce

  1. Create a view displaying a summary.
  2. Enable AJAX on this view.
  3. Trigger an AJAX request.
  4. No active link is set.

Proposed resolution

\Drupal::service('path.current')->getPath() seems to get the current path correctly even in AJAX requests.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Remove "Forgot your password?" link on failed login attempt message if user has no access to the user password reset form

$
0
0

Problem/Motivation

The user password reset form can be disabled by altering its route access conditions. It is common on sites where user credentials are managed under some specific way.

The login form displays the following message with a link to the password reset form on a failed user login attempt:

"Unrecognized username or password. Forgot your password?"

If the user has no access to the user password reset form, the link ends in 403.

Proposed resolution

Check access to the user password reset URL and display the "Forgot your password?" link only if the user can actually reach its URL.

Remaining tasks

Review, test.

User interface changes

As described.


"Delete" action is shown as text and not link for Views-generated link in a menu

$
0
0

Problem/Motivation

On Drupal 10.4.4, when viewing the links of a menu, I noticed that the "Delete" action in Operations dropbutton is shown as text and not as link for a Views-generated link I had. As far as I understand, I cannot delete that link from the Menu page but only from the View, so having this action as text seems to be a bug.

The Views-generated link "Delete" action:
Views-generated link "Delete" action

The manually-added link "Delete" action for comparison:
Manually-added link "Delete" action

Steps to reproduce

  • Create a View Page and add it to a Menu as "Normal menu entry".
  • Go to that Menu's edit page /admin/structure/menu/manage/[menu_name].
  • Click the Operations dropbutton and navigate to "Delete".

Proposed resolution

Unfortunately I don't have one.

Introduce composer/pcre (or similar) in order to handle preg_* functions failures

$
0
0

Problem/Motivation

Inspired by the work and analysis taking place in #3239472: preg_split in _filter_url breaks for long html tags it becomes clear that testing codes as well as the actual codes from core would benefit from having type-safe preg_* replacements.

The silent failing of preg_* functions causes critical issues that are difficult (but not impossible) to figure out as well as capture in tests.

Steps to reproduce

@see #3239472: preg_split in _filter_url breaks for long html tags and MR !2862 mergeable

Proposed resolution

Scan and replace all preg_* function calls with their equivalent Composer\Pcre\Preg::* method
Additionally, update/extend tests that were trying to capture failures (based on FALSE/NULL return values) and can now expect a known exception.
An example @see the approach taken in the MR =>
MR !2865 mergeable

Remaining tasks

  1. Discuss the suggestion and try to figure out if another library or own code makes more sense
  2. Decide for this refactoring
  3. Add composer/pcre as a dependency
  4. Refactor test codes for exception expectation
  5. Refactor codes and replace preg_* function

Explicitly register template_preprocess callbacks in hook_theme()

$
0
0

Problem/Motivation

template_preprocess... functions are very unusual. They are the only thing in modules that's not prefixed by the module.

#3495943: Handle module preprocess functions as OOP hooks is struggling a bit with that and need to introduce the ability for modules to register them as hooks but not for themself but a "template" pseudo-module.

The reason they are important is order of preprocess callbacks. Currently, first is template_preprocess(), followed by the template_preprocess function for the specific theme definition/hook if it exists, then global regular preprocess functions such as contextual_preprocess() and finally regular specific module and then theme preprocess functions.

Steps to reproduce

Proposed resolution

I'm proposing a different approach, that instead of magically named callbacks with a special prefix, or OOP hooks registered for template, we put them explicitly into hook_theme as a callback. Similar to #pre_render, #process and the other callbacks you can register in an Element plugin.

A cleaner option would to make a theme definition/hook an actual class like a plugin an then it could have a preprocess() method. There are old issues for introducing that, but it's a far more complex step that requires bigger changes and performance testing.

This requires template_preprocess() to be removed first: #2340341: Move template_preprocess, _template_preprocess_default_variables into services

Remaining tasks

* Agree that this makes sense.
* Agree on the specific array key
* documentation updates and change record
* Follow-ups to convert remaining template_preprocess, possibly a meta with a few child issues and then a deprecation.

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Convert hook_requirements that do interact with install time that are not system

$
0
0

Problem/Motivation

There is a new api for install time requirements, we should use this.

Steps to reproduce

  • layout_discovery
  • media
  • package_manager
  • pgsql
  • experimental_module_requirements_test
  • requirements1_test
  • workspaces
  • testing_requirements

Functional updates:
Media had an unnecessary !empty($error), that was removed and baseline updated.
Package manager install check technically ran in all phases, but only really needs to run for install time.
Package manager similarly the FailureMarker check ran during install, but doesn't really make sense there.

Proposed resolution

Convert to the new class structure.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Implement PSR-20 in datetime.time service

$
0
0

Problem/Motivation

PSR-20 defines a standard interface for system clocks.
The datetime.time service is a system clock that fits this description.

If it implemented PSR-20, the service could be used with other libraries that can use a PSR-20 clock. And so it would encourage service reuse instead of having multiple implementations on the same website.

Steps to reproduce

Proposed resolution

Add a composer dependency on psr/clock and make Drupal\Component\Datetime\Time implement Psr\Clock\ClockInterface

Remaining tasks

User interface changes

Introduced terminology

API changes

Drupal\Component\Datetime\Time implements Psr\Clock\ClockInterface

Data model changes

Release notes snippet

[meta] Convert hook_requirements to new class or hook_update_requirements or hook_runtime_requirements

$
0
0

Problem/Motivation

Many hook_requirements implementations have dependencies that are not explicit, and are difficult to test due to a lack of dependency injection.

Postponed on:

Steps to reproduce

N/A

Proposed resolution

Create subtasks for each module that implements hook_requirements

Remaining tasks

Create tasks

Already converted

  • file

Runtime phase only
#3500632: Convert hook_requirements() that do not interact with install time

  • image
  • jsonapi
  • locale
  • mysql
  • navigation
  • node
  • search
  • update_test_schema
  • update
  • user
  • demo_umami

Update phase only
#3500632: Convert hook_requirements() that do not interact with install time

  • update_script_test

Includes install phase
#3513410: Convert hook_requirements that do interact with install time that are not system

  • layout_discovery
  • media
  • package_manager
  • pgsql
  • experimental_module_requirements_test
  • requirements1_test
  • workspaces
  • testing_requirements

System

  • system (oh boy): #3493718: Split up and refactor system_requirements() into OOP hooks
  • User interface changes

    N/A

    Introduced terminology

    N/A

    API changes

    N/A

    Data model changes

    N/A

    Release notes snippet

    N/A

    Form-display edit?

    $
    0
    0

    Is it only available on the "display" page of the content type, not on the "form-display" page.
    It would also be useful for designing the form-display page if the fields could be arranged in columns.
    If a separate module has to be used for this (e.g. Display Suite), then it is unnecessary to have it as part of the core, because then DS will solve both things.


    Media file revision access

    $
    0
    0

    Problem/Motivation

    When creating a media with a file field and enabling the revisions, the file is still accessible.
    It is right to keep the file on the table file_usage as is on a revision, but maybe the file should not be accessible if the revision is not the default one.

    As the file is a different entity, we are not sure if it is a problem that should be taken into account or not, as if the media entity is unpublished the file is also accessed, but some editors take the media as "files".

    Steps to reproduce

    Create a media and add a file field, also enable the revisions.
    Upload a file on the new media, and create a new revision with a different file, if you try to access the file attached to the previous revision, it is still accessible.

    Delete comment module form alters calling getFieldUIPageTitle

    $
    0
    0

    Problem/Motivation

    #3479141-46: Implement FormAlter and Alter attribute
    They haven't been missed in 10 years so it should be safe to delete them.

    Steps to reproduce

    Search core for getFieldUIPageTitle

    Proposed resolution

    Delete them

    Remaining tasks

    Review

    User interface changes

    N/A

    Introduced terminology

    N/A

    API changes

    N/A

    Data model changes

    N/A

    Release notes snippet

    N/A

    Incorrect display, need to reload the page.

    $
    0
    0

    Problem/Motivation

    I am currently working on transitions of existing Drupal 7 site to Drupal 11.

    I installed Drupal 11.1.4

    After installation completion, I am redirected to the « Welcome page ».
    Display does not correspond to the expected look and feel. See screenshot 1
    Reloading the page leads to a correct display of the « Welcome page ». See screenshot 2

    When navigating to admin/content, once again, display does not correspond to the expected look and feel. See screenshot 3.
    Reloading the page leads to a correct display of the admin/content page. See screenshot 4

    Display is not systematically wrong. What I observe is when is takes some time for the page to load, there is a chance that the display is wrong. It seems that when the loading of the page is without delay, the display is correct.

    I never experienced this problem with Drupal 7, Drupal 8 nor Drupal 9.
    It is with Drupal 10 and Drupal 11 installation that I have observed this problem.

    Any idea of the origin of this problem ?.

    Steps to reproduce

    Proposed resolution

    Remaining tasks

    User interface changes

    Introduced terminology

    API changes

    Data model changes

    Release notes snippet

    Undefined array key "type" in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::castValue()

    $
    0
    0

    Problem/Motivation

    We have an issue when we want to change user's roles. The modifications are well applied in Drupal BO and in the DB but we have this warning. This is since a Drupal upgrade from 10.3.11 to 10.4.3.
    We have role_delegation module installed.
    We have this warning :

    Warning : Undefined array key "type" dans Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::castValue() (/var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php ligne 2570)
    #0 /var/www/html/web/core/includes/bootstrap.inc(166): _drupal_error_handler_real()
    #1 /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php(2570): _drupal_error_handler()
    #2 /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1070): Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::castValue()
    #3 /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1129): Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapToStorageRecord()
    #4 /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1015): Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapToDataStorageRecord()
    #5 /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(935): Drupal\Core\Entity\Sql\SqlContentEntityStorage->saveToSharedTables()
    #6 /var/www/html/web/core/modules/user/src/UserStorage.php(33): Drupal\Core\Entity\Sql\SqlContentEntityStorage->doSaveFieldItems()
    #7 /var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(718): Drupal\user\UserStorage->doSaveFieldItems()
    #8 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(486): Drupal\Core\Entity\ContentEntityStorageBase->doSave()
    #9 /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(806): Drupal\Core\Entity\EntityStorageBase->save()
    #10 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityBase.php(354): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()
    #11 /var/www/html/web/core/modules/user/src/ProfileForm.php(46): Drupal\Core\Entity\EntityBase->save()
    #12 [internal function]: Drupal\user\ProfileForm->save()
    #13 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(129): call_user_func_array()
    #14 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(67): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers()
    #15 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(597): Drupal\Core\Form\FormSubmitter->doSubmitForm()
    #16 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(326): Drupal\Core\Form\FormBuilder->processForm()
    #17 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
    #18 /var/www/html/web/core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult()
    #19 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
    #20 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
    #21 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #22 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
    #23 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
    #24 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #25 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #26 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
    #27 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #28 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #29 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
    #30 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(116): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
    #31 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass()
    #32 /var/www/html/vendor/asm89/stack-cors/src/Cors.php(53): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #33 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Asm89\Stack\Cors->handle()
    #34 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #35 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #36 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
    #37 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
    #38 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
    #39 {main}
    

    Steps to reproduce

    Go to BO and select a user then change his assigned roles and save.

    Proposed resolution

    Tried applying this patch as I saw that another patch was done for "Undefined array key "id"" in role_delegation module :

    diff --git a/role_delegation.module b/role_delegation.module
    index 0af744a..750b2e4 100644
    --- a/role_delegation.module
    +++ b/role_delegation.module
    @@ -264,6 +264,11 @@
       // work without the 'administer users' permission. If another module has
       // already swapped out those classes, though, we'll be polite and do nothing.
       foreach ($definitions as &$definition) {
    +    if (!isset($definition['type'])) {
    +      \Drupal::logger('role_delegation')->warning("add missing field 'type' in a role change operation");
    +      $definition['type'] = 'user'; // Valeur par défaut.
    +    }
         if ($definition['id'] === 'user_add_role_action'&& $definition['class'] === AddRoleUser::class) {
           $definition['class'] = RoleDelegationAddRoleUser::class;
         }
    

    Claro primary tabs collapsed menu hamburger icon has insufficient contrast with forced-colors dark background

    $
    0
    0

    Problem/Motivation

    In forced-colors emulation on Firefox MacOS, the "hamburger" menu icon for the collapsed primary tabs (menu local tasks) does not adjust color.

    On a dark background, the blue icon has insufficient contrast.

    Screenshot of Claro primary tabs menu hamburger icon in forced-colors mode

    I'd guess that this also applies to WHCM, but that needs confirmation.

    Steps to reproduce

    1. In the Firefox Configuration Editor, change browser.display.document_color_use to 2.
    2. In the Firefox color settings, change colors to get dark background, light text, and yellow links, with "Override" set to "Always".
      screenshot of Firefox color settings
    3. With Claro as the admin theme, go to /admin/content.
    4. Reduce the window size until the primary tabs collapse into a menu with the hamburger icon.

    Like the table sort icons, the color of the hamburger icon should match the color of links:

    Screenshot of Claro primary tabs menu hamburger icon in forced-colors mode

    Proposed resolution

    1. Change the icon to a background image.
    2. In a media query for forced-colors: active, use the CSS mask-image property with linktext background color.

    For example, the table sort direction indicator:

      @media (forced-colors: active) {
        background: linktext;
        mask-image: url(../../images/icons/003ecc/sort--asc.svg);
      }
    

    Remaining tasks

    User interface changes

    Introduced terminology

    API changes

    Data model changes

    Release notes snippet

    Viewing all 296332 articles
    Browse latest View live


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