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

Remove documentation for logged_in and is_admin from node.html.twig

$
0
0

Problem/Motivation

These variables are set in user_template_preprocess_default_variables_alter() and don't need to be duplicated in the node.html.twig documentation, which is approximately a metre long.

Steps to reproduce

Proposed resolution

Remaining tasks

Remove the same documentation lines from duplicates of node.html.twig which is included in various core themes.

User interface changes

API changes

Data model changes

Release notes snippet


Add validation constraints to core.entity_view_mode.*.*

$
0
0

Problem/Motivation

View modes have 3 property paths that are not yet validatable:

./vendor/bin/drush config:inspect --filter-keys=core.entity_view_mode.taxonomy_term.full --detail --list-constraints --fields=key,validatability,constraints
➜  🤖 Analyzing…

 --------------------------------------------------------------------- ------------- --------------------------------------------------------------------------------------------- 
  Key                                                                   Validatable   Validation constraints                                                                       
 --------------------------------------------------------------------- ------------- --------------------------------------------------------------------------------------------- 
  core.entity_view_mode.taxonomy_term.full                              79%           ValidKeys: '<infer>'                                                                         
   core.entity_view_mode.taxonomy_term.full:                            Validatable   ValidKeys: '<infer>'                                                                         
   core.entity_view_mode.taxonomy_term.full:_core                       Validatable   ValidKeys:                                                                                   
                                                                                        - default_config_hash                                                                      
   core.entity_view_mode.taxonomy_term.full:_core.default_config_hash   Validatable   NotNull: {  }                                                                                
                                                                                      Regex: '/^[a-zA-Z0-9\-_]+$/'                                                                 
                                                                                      Length: 43                                                                                   
                                                                                      ↣ PrimitiveType: {  }                                                                        
   core.entity_view_mode.taxonomy_term.full:cache                       Validatable   ↣ PrimitiveType: {  }                                                                        
   core.entity_view_mode.taxonomy_term.full:dependencies                Validatable   ValidKeys: '<infer>'                                                                         
   core.entity_view_mode.taxonomy_term.full:dependencies.module         NOT           ❌ @todo Add validation constraints to ancestor type: config_dependencies                    
   core.entity_view_mode.taxonomy_term.full:dependencies.module.0       Validatable   NotBlank: {  }                                                                               
                                                                                      ExtensionName: {  }                                                                          
                                                                                      ExtensionExists: module                                                                      
                                                                                      ↣ PrimitiveType: {  }                                                                        
   core.entity_view_mode.taxonomy_term.full:description                 Validatable   Regex:                                                                                       
                                                                                        pattern: '/([^\PC\x09\x0a\x0d])/u'                                                         
                                                                                        match: false                                                                               
                                                                                        message: 'Text is not allowed to contain control characters, only visible characters.'↣ PrimitiveType: {  }                                                                        
   core.entity_view_mode.taxonomy_term.full:id                          NOT           ⚠️  @todo Add validation constraints to config entity type: core.entity_view_mode.*.*        
   core.entity_view_mode.taxonomy_term.full:label                       Validatable   Regex:                                                                                       
                                                                                        pattern: '/([^\PC])/u'                                                                     
                                                                                        match: false                                                                               
                                                                                        message: 'Labels are not allowed to span multiple lines or contain control characters.'    
                                                                                      NotBlank: {  }                                                                               
                                                                                      ↣ PrimitiveType: {  }                                                                        
   core.entity_view_mode.taxonomy_term.full:langcode                    Validatable   NotNull: {  }                                                                                
                                                                                      Choice:                                                                                      
                                                                                        callback: 'Drupal\Core\TypedData\Plugin\DataType\LanguageReference::getAllValidLangcodes'↣ PrimitiveType: {  }                                                                        
   core.entity_view_mode.taxonomy_term.full:status                      Validatable   ↣ PrimitiveType: {  }                                                                        
   core.entity_view_mode.taxonomy_term.full:targetEntityType            NOT           ⚠️  @todo Add validation constraints to config entity type: core.entity_view_mode.*.*        
   core.entity_view_mode.taxonomy_term.full:uuid                        Validatable   Uuid: {  }                                                                                   
                                                                                      ↣ PrimitiveType: {  }                                                                        
 --------------------------------------------------------------------- ------------- --------------------------------------------------------------------------------------------- 

Steps to reproduce

  1. Get a local git clone of Drupal core 11.x.
  2. composer require drupal/config_inspector— or manually install https://www.drupal.org/project/config_inspector/releases/2.1.5 or newer (which supports Drupal 11!)
  3. composer require drush/drush
  4. vendor/bin/drush config:inspect --filter-keys=core.entity_view_mode.taxonomy_term.full --detail --list-constraints

Proposed resolution

Add validation constraints to:

  1. core.entity_view_mode.*.*:dependencies.module
  2. core.entity_view_mode.*.*:id
  3. core.entity_view_mode.*.*:targetEntityType

This requires looking at the existing code and admin UI (if any) to understand which values could be considered valid. Eventually this needs to be reviewed by the relevant subsystem maintainer.

For examples, search *.schema.yml files for the string constraints:😊

Reach out to @borisson_ or @wimleers in the #distributions-and-recipes.

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

More validation 🚀

Release notes snippet

None.

Rename 'Tags' vocabulary to the singular 'tag' for consistency

$
0
0

Node bundles in the standard profile:
article
page

User bundle:
user

Block bundle:
basic

Taxonomy bundle:
tags

Why is only one plural and the other default bundles singular? We should aways be consistent when providing defaults.

I get that changing the machine name would possibly mess up a lot of sites because folks unfortunately just install Standard profile and run with it instead of considering their own install profile with their own bundles.

However, I stand that with the next major version change, we should strongly consider refactoring the "out of the box" entity bundles and re-think what kind of DX confusion is caused by having both plural and singular used across the "default" bundle names.

I have many times run into issues with 'tags' (or any bundle name that is plural) due to this inconsistency.

I am not saying we should enforce people to not use plurals in bundle names, we should encourage consistency.

Make the moderation control form an entity form so that it validates entities before save

$
0
0

Problem/Motivation

Currently the moderation form that appears on top of draft entities for the purposes of moderation is a custom form. This form doesn't attempt to validate entities before saving them, reducing the overall utility of entity validations.

Proposed resolution

  • Fix this by moving the form into an entity form.
  • For rendering, create a transient view mode, as was done with the layout builder form.

Before:

After:

Remaining tasks

Review + commit.

User interface changes

Minor label changes.

API changes

Render array changes, with a change record.

Data model changes

None.

Release notes snippet

upgrade 10.3.0

$
0
0

Hello, sorry for my English langage.

Context :
Site : https://aacm-france.fr
Host: PlanetHoster
CSV /Drupal version installed D10.3.0 managed with composer
Modules :
- drupal/ctools:^4.0
- drupal/imce:^3.0
- drupal/colorbox:^2.0
- drupal/media_gallery:^2.1
- drupal/admin_toolbar:^3.4
- drupal/vapn:^3.0@alpha
- drupal/ckeditor_font:^2.0@beta
PHP : 8.2.5
Database: 10.5.21-MariaDB

Bug: since update D10.2.7 to D10.3.0
Bug description: Modified display for creating or modifying an article, page or gallery with disappearance of areas of the writing body or summary (screenshots 1 -2 -3 ). In some cases semi-possible with simple HTML (screenshots 4 -5)
I tried to recreate the base of the site (core + modules + theme) several times directly with D10.3.0 same problem for each try.
In the reports: recent log messages: very many messages system. (screenshots 6 as 7 -8 -9).
Searches in the Drupal bug report: Issues for Drupal core: I couldn't find anything that resembled my problem.
Question: I don't understand why no one has the same problem. Is there a solution that I missed?

Navigation: Theme aside layout builder section on navigation block page

$
0
0

Problem/Motivation

Layout builder region on Navigation block page is breaking when collapsed.

Steps to reproduce

1. Install navigation module.
2. Go on admin/config/user-interface/navigation-block/ page
3. Collapse the left side bar
4. You'll see the design is breaking.
5. See image for reference

Proposed resolution

Fix the styling of collapsed aside region.

Solution - I have fixed the font size and reduced the padding on nav.

Remaining tasks

User interface changes

After Fix -

API changes

Data model changes

Release notes snippet

"Source path has to start with a slash" exception when hitting path prefixed with index.php with RequestPath condition

$
0
0

Problem/Motivation

When hitting a site with at least one block configured with a request_path condition on any URL prefixed with index.php (i.e example.com/index.phpfoo, the following error is thrown (truncated stacktrace for brevity)

InvalidArgumentException: Source path foo has to start with a slash. in Drupal\path_alias\AliasManager->getAliasByPath() (line 185 of core/modules/path_alias/src/AliasManager.php).

Drupal\system\Plugin\Condition\RequestPath->evaluate() (Line: 77)
Drupal\Core\Condition\ConditionManager->execute() (Line: 84)
Drupal\Core\Condition\ConditionPluginBase->execute() (Line: 26)

Steps to reproduce

  1. Clean Drupal installation
  2. Go to admin/structure/block, edit any (for example: Search) block that appears on the frontpage
  3. Go to pages tab and set /user/* and click "Show for the listed pages"
  4. Go to your.site/index.php.php
  5. There is an exception: InvalidArgumentException: Source path .php has to start with a slash. in Drupal\Core\Path\AliasManager->getAliasByPath() (line 229 of core/lib/Drupal/Core/Path/AliasManager.php).

Proposed resolution

Potentially always prefix $path with a forward slash.

Fix Content Moderation tests that rely on UID1's super user behavior

$
0
0

Problem/Motivation

In #540008: Add a container parameter that can remove the special behavior of UID#1 an approach was taken where we can simply flag tests that are failing if we turn off user 1's super user powers, so that they can be taken care of in a followup. This issue is to collect all of these followups.

The goal is to have no tests in Drupal core that rely on UID1's special privileges so that we:

  1. Know these tests are correctly assigning the necessary permissions to run
  2. Can turn off the super user access policy in D11, knowing it won't break core
  3. Can remove the super user access policy in D12, providing an admin account recovery tool to replace it

Steps to reproduce

Go into any of the tests flagged with:

  /**
   * {@inheritdoc}
   *
   * @todo Remove and fix test to not rely on super user.
   * @see https://www.drupal.org/project/drupal/issues/3437620
   */

And:

  1. Remove the code below that sets the usesSuperUserAccessPolicy to TRUE.
  2. Run the test to see which test methods are failing

Proposed resolution

Assign the right permissions to make the test go green without the super user access policy. Those few tests that specifically test said policy can obviously stay, but will be removed along with the policy in D12.

Remaining tasks

  • core/modules/content_moderation/tests/src/
    • Functional/ModerationContentTranslationTest.php
    • Functional/ModerationFormTest.php
    • Functional/ModerationLocaleTest.php
    • Functional/ModerationStateBlockTest.php
    • Functional/WorkspaceContentModerationIntegrationTest.php
    • Kernel/EntityStateChangeValidationTest.php

Remove reference to \Drupal\Core\Block\Annotation\Block (possibly more?)

$
0
0

Problem/Motivation

Follow up from #2798531: Add example and sections to core Block API documentation that issue mentions removing reference to annotation\Block but should scope be expanded to include more modules?

Steps to reproduce

N/A

Proposed resolution

TBD. Need to determine scope

Remaining tasks

Determine scope

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Add example and sections to core Block API documentation

$
0
0

Problem/Motivation

Unlike many other pages of core documentation, the Block API documentation doesn't contain a worked example.

Compare:

* https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21me...
* https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Routing%2...
* https://api.drupal.org/api/drupal/core%21core.api.php/group/form_api/8.2.x
* https://api.drupal.org/api/drupal/core%21modules%21block%21block.api.php...

While the Block API documentation links off to examples elsewhere in a contrib module, this is probably not great practice (and definitely not consistent with the other API docs.)

Proposed resolution

Add an example to block.api.php
Add sections.
Do not remove references to \Drupal\Core\Block\Annotation\Block. let's do that in a separate issue

Remaining tasks

Review
Commit

User interface changes

None.

API changes

None.

Data model changes

None.

Disabled text formats can't be seen in the GUI

$
0
0

Problem/Motivation

When you disable a text format it is not possible to re-enable it. This seems counter to the behavior in other situations, such as Views, which allows disabling than re-enabling a display. Furthermore, it can lead to major problems on a site if a text format was mistakenly disabled.

Steps to reproduce

Disable a text format and experience the disappointment upon realizing it can't be re-enabled. You'd need to create a new text format (yet can't create one with the same machine name), then change all items previously using the old one to use the new one.

Work around

\
From #60

  1. go to /admin/config/development/configuration/single/export
  2. choose Text format as the Configuration type
  3. choose the disabled text format as Configuration Name
  4. copy the configuration
  5. go to /admin/config/development/configuration/single/import
  6. choose Text format as the Configuration type
  7. paste the configuration
  8. change "status" from false to true
  9. click on import

Proposed resolution

Add an "Enable" operation for disabled text formats, which can be used to re-enable the disabled text format.

Add a 'Status' column to disable the status of the format. This is similar to the search pages, /admin/config/search/pages.

Remaining tasks

Code review

If needed add a followup to explore and implement an effective solution for ensuring cache reflects changes when a text format is re-enabled. This may involve adjusting or entirely rethinking the approach to cache tag management within preRenderText method of core /modules/filter/src/Element/ProcessedText.php#142 and #144

User interface changes

Both screenshots taken after disabling the Basic filter

Before

After

API changes

Data model changes

Release notes snippet

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryBug because of unexpected behaviour. Upon disabling the text format it disappears from the form which makes it seem deleted, but it isn't actually deleted because you can't add a new text format with the same machine name.
Issue priorityMajor because as cilefen states in #19:

Actually, there is no workaround for GUI users (imagine "I want my text format back!"), so this is major.

Prioritized changesThe main goal of this issue is two-fold, fixing a DrupalWTF bug and improving usability.
DisruptionNon-disruptive because only the filter format admin interface is changed. No API changes

Drupal\Core\Command\InstallCommand should provide a --password option

$
0
0

Problem/Motivation

When troubleshooting and reviewing issues on different core branches I've following workflow

git checkout 11.x
composer install
php -d memory_limit=512M core/scripts/drupal quick-start standard
# Above command will install Drupal and generate random password. Due to #3271178 this will hang up randomly, so I must do following:
# 1. go to http://127.0.0.1:8888/user/1/edit and change "Email address" domain to valid one and change password to something that is easy to remember/static so the browser password manager can use it.
# 2. ctrl+c on terminal
php -d memory_limit=256M -S localhost:8888 .ht.router.php

I understand this workflow is just a work-a-round for #3271178: Quick start command installation stops responding, but since that issue is going to take time to fix, I'd like to get password option so the workflow could be minified to:

git checkout 11.x
composer install
php -d memory_limit=512M core/scripts/drupal quick-start standard --password=123
# ctrl+c on terminal
php -d memory_limit=256M -S localhost:8888 .ht.router.php

Steps to reproduce

Proposed resolution

Add password option to Drupal\Core\Command\InstallCommand

Remaining tasks

- MR
- Acceptance for idea
- Tests
- RTBC
- Profit

User interface changes

API changes

Data model changes

Release notes snippet

Fix 'Drupal.Semantics.FunctionT.NotLiteralString' coding standard

$
0
0

Problem/Motivation

Part of #2571965: [meta] Fix PHP coding standards in core.
Sniff for coding standard is not implemented.

<rule ref="Drupal.Semantics.FunctionT.NotLiteralString"/>

Steps to reproduce

Proposed resolution

Add <rule ref="Drupal.Semantics.FunctionT.NotLiteralString"/> to phpcs.xml.dist
Add ignore lines where it can't be changed to using only literals. That is currently 70 lines.

Remaining tasks

Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

Convert entity type discovery to PHP attributes

"core/scripts/drupal install" should provide a --no-progress option

$
0
0

Problem/Motivation

For automated installations via CI or similar the progress output of core/scripts/drupal install is unnecessary and looks a bit strange, for example:

 0/17 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]
Installing Drupal
 6/17 [▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░]
Set up database
 7/17 [▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░]
Set up database
 9/17 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░]
Install site
11/17 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░]
Configure site
12/17 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░]
Configure site
13/17 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░]
Congratulations, you installed Drupal!
17/17 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
Congratulations, you installed Drupal!

Steps to reproduce

Proposed resolution

There should be a --no-progress option, similar to other command-line tools such as Composer, PHPUnit, etc.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Search for node content in current language

$
0
0

Problem/Motivation

When searching for content in a multilingual website, Drupal core display results in all languages.

This maybe considered a blocking issue to resolve #3041039: Search for content in current language or a duplicate of that one.

Proposed resolution

When no language is chosen in advance-search, display results only in current language.

Remaining tasks

Create a patch.

Special Menu items are rendered as empty links in navigation

$
0
0

Problem/Motivation

When adding a Menu Item, it is possible to add special items like <nolink> or <button>

According to Menu Link form:
Enter <nolink> to display link text only. Enter <button> to display keyboard-accessible link text only.

Current navigation twig template structure does not respect these items and render them as links whose href is empty, having a different behavior than the expected one.

Attaching screenshots of the same menu as part of navigation or as a block to show the differences:

Steps to reproduce

  • Install a Drupal site and enable navigation
  • Edit any of the menus included in the navigation bar
  • Add menu links whose Link field value is <nolink> or <button>
  • Confirm that those items are shown as empty links instead of the expected HTML markup

Proposed resolution

Update navigation twig templates to respect the special menu items behavior.
Checked how menu.html.twig works and it seems this piece of code generates the expected markup:

{{
  link(
    item.title,
    item.url,
    item.attributes.removeClass(item_classes).addClass(link_classes)
  )
}}

Could be worth to explore how it works and try to reuse or replicate its behavior.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

logic exception in Drupal\Core\Config\Schema\Mapp

$
0
0

Problem/Motivation

php      Error      LogicException: The mapping definition at
                                               `ckeditor5.plugin.ckeditor5_list:properties` is invalid: its `label`
                                               key contains a string. It must be an array. in
                                               Drupal\Core\Config\Schema\Mapp

Steps to reproduce

Since 10.3 upgrade

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Add Tugboat configuration to core

$
0
0

Problem/Motivation

Based on this comment by @drumm at #3200622-3: Have Drupal core Tugboat previews default to using Umami profile (instead of standard), we can add a .tugboat/config.yml file to Drupal core in order to manage Tugboat configuration more effectively.

At the moment Tugboat configurations are hosted at https://github.com/TugboatQA/drupalorg/tree/master/drupal. The way this works, it should pick up the configuration file right away if it exists. Details at https://git.drupalcode.org/project/drupalorg/-/blob/7.x-3.x/drupalorg/in....

Drupal core's current Tugboat QA integration requires a bit of custom code both in Drupal.org Customizations and with a separate repository hosted on GitHub that contains the configuration for Drupal core versions, as necessary. When a new core development branch is created, the Tugboat QA support team often needs to create a new branch here before Tugboat previews will build correctly for the new branch. For the most part, these separate configs are identical, with PHP versions being the primary difference.

It would be ideal for these Tugboat config files to live inside of the Drupal core repository itself. The benefits of this are:

  1. Each branch can maintain their desired PHP compatibility without impacting other Tugboat builds
  2. New branches will automatically inherit the working Tugboat config from the previous branch
  3. The Drupal.org Customizations module will be able to remove custom code that is used to pull the Drupal core config from the separate GitHub repository.
  4. On a related note, currently if a Tugboat Base Preview needs to be created, it requires the execution of a custom drush command in d.o prod, which means that someone on the Drupal Association Engineering team needs to execute this. If the config lived in the repository, the Tugboat QA support team could perform these operations without needing to inconvenience the DA team.
  5. If PHP compatibility is being worked on in an MR, that branch can modify the config.yml to change to the newer PHP version. This would allow for manual QA of the new PHP version in Tugboat previews prior to the merge occurring.

, so that each branch can customize as necessary, and so that additional logic isn't needed inside of the drupalorg module to create

Proposed resolution

Add this config.yml file to the 11.x branch, and then backport to other active branches from there.

Some discussion around this change can be found in Drupal slack.

Add support for additional coloured notices

$
0
0

In drupal there are numerous notices.

e.g. MigrationInterface has the following status's

MESSAGE_INFORMATIONAL
MESSAGE_NOTICE
MESSAGE_WARNING
MESSAGE_ERROR

however claro only supports the following traffic light system namely

status - green
warning -amber
error - red

it would useful to add some additional notices

e.g.

info - blue
notice - greyblue

https://www.drupal.org/files/issues/2024-04-03/Screenshot%202024-04-03%2...
https://www.drupal.org/files/issues/2024-04-03/Screenshot%202024-04-03%2...

Viewing all 292118 articles
Browse latest View live


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