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

Incorrect order and duplicate theme hook suggestions

$
0
0

Just by turning on twig debug and looking at theme suggestions, you can see for the main menu (and any corresponding menu like footer) that there is a duplicate theme suggestion and at the most specific level which overrides any and all customizations in hook_theme_suggestions_alter().

<!-- THEME DEBUG -->
<!-- THEME HOOK: 'menu__main' -->
<!-- FILE NAME SUGGESTIONS:
   x menu--main.html.twig
   * menu--main--customization.html.twig
   x menu--main.html.twig
   * menu.html.twig
-->

Should be:

<!-- THEME DEBUG -->
<!-- THEME HOOK: 'menu__main' -->
<!-- FILE NAME SUGGESTIONS:
   x menu--main--customization.html.twig
   * menu--main.html.twig
   * menu.html.twig
-->

Add support for OR in block visibility conditions

$
0
0

Problem/Motivation

Block visibility settings allow to show a block "per page path" OR "per content type" only.

Example: "Recent blog posts" - a pure blog related block.
If "Pages" is set to "All pages" AND "Content types" to "Blog entry" it will show up ONLY on blog posts but not on Blogs page.
If "Only the listed pages" is set to "blog" it will show up ONLY on Blogs page but not on any of blog posts.
If "Only the listed pages" is set to "blog" AND "Content types" is set to "Blog entry" it will not be shown at all. Nowhere.
Isn't it logical to allow it to be visible at Blogs page AND Blog posts?

The same goes for any other block, not only "recent blog posts".

(There are snippets like this one http://drupal.org/node/134425 but they require the PHP module.)

Steps to reproduce

Proposed resolution

Add support for OR conditions groups

Remaining tasks

Add automated test coverage
Update issue summary proposed resolution and steps to reproduce

User interface changes

2022-07-21/923934 after patch.png

API changes

Data model changes

Release notes snippet

Fix strict type errors in Functional tests: Add casts and fix types where needed

$
0
0

Problem/Motivation

See parents.

This issue is for:

  • adding explicit (string), (int) and (bool) casts
  • fixing incorrect type declarations
  • fixing incorrect hardcoded values (floats to ints, ints to bools, etc)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

No messages after the migration.

$
0
0

Problem/Motivation

During the migration the some data can be migrated as failed. I know that one of the migrate plugin throws an exception with a detailed message. But after the migration is finished only summary is presented (X imported, Y failed). The messages are
empty. After debugging I found out that messages are cleared every time in Drupal\migrate\Plugin\migrate\source\SourcePluginBase::next() file core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php:

        // Clear any previous messages for this row before potentially adding
        // new ones.
369: if (!empty($this->currentSourceIds)) {
370:   $this->idMap->delete($this->currentSourceIds, TRUE);
371: }

So, every time as the new row will be migrated the next() method will iterate over previous rows and it will clear their messages.

Proposed resolution

I think that the message should be cleared before the row is scheduled to import.

User interface changes

No visible changes.

API changes

None.

Data model changes

None.

Fix strict type errors: Convert FormattableMarkup to strings (complex replacement) in core Functional tests

$
0
0

Problem/Motivation

See parent(s).

This issue is for complex conversions of FormattableMarkup into regular double-quoted strings with simple function calls or new variables used in the arguments embedded directly inside the quoted string. Occasional use of sprintf may also be considered.

The scope here is the core Functional tests.

Steps to reproduce

Proposed resolution

Convert all test assertion methods in functional tests from using FormattableMarkup that are not covered in #3404273: Fix strict type errors: Convert FormattableMarkup to strings (simple replacement) in core Functional tests.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Empty layout sections get rendered

$
0
0

Problem/Motivation

Empty sections create unnecessary markup. Also, if you've styled the sections with a background/padding you'll get some unwanted bars.

Proposed resolution

Remove empty sections while preserving their cache metadata.

Remaining tasks

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

Error on drush locale:check PHP Fatal error: Cannot redeclare locale_translation_batch_version_check() previously declared

$
0
0

Problem/Motivation

Since 10.2.1 update (updated from 10.1.6), drush locale:check fails with error :
PHP Fatal error: Cannot redeclare locale_translation_batch_version_check() (previously declared in /var/www/html/web/core/modules/locale/locale.batch.inc:40) in /var/www/html/web/core/modules/locale/locale.batch.inc on line 97

The function is indeed declared twice since
https://git.drupalcode.org/project/drupal/-/merge_requests/5616/diffs
from this issue https://www.drupal.org/project/drupal/issues/2575945

Steps to reproduce

Update to 1.0.2.1 and run drush locale:check

Proposed resolution

Refactor locale.batch.inc

Incorrect typehint of LOGGED_IN and LOGGED_OUT consts in UserAuthenticationController

$
0
0

Problem/Motivation

The @var annotation of UserAuthenticationController::LOGGED_IN and UserAuthenticationController::LOGGED_OUT suggest these constants are strings when they are in fact ints.

Steps to reproduce

Proposed resolution

Fix annotation

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Warning: Undefined array key "title" in Drupal\update\ProjectSecurityRequirement::createFromProjectDataAndSecurityCoverageInfo()

$
0
0

Run update.php for drupal 10.2
Warning: Undefined array key "title" in Drupal\update\ProjectSecurityRequirement::createFromProjectDataAndSecurityCoverageInfo()
I debug and found that

Module annoucements feed (core Drupal 10.2) has no title
core/modules/update/src/ProjectSecurityRequirement.php line 103

if (isset($project_data['existing_version'])) {
      [$major, $minor] = explode('.', $project_data['existing_version']);
      $existing_version = "$major.$minor";
      $next_version = "$major." . ((int) $minor + 1);
      return new static($project_data['title'], $security_coverage_info, $existing_version, $next_version);
    }

annoucement

Create enums for RequirementSeverity and deprecate drupal_requirements_severity() constants

$
0
0

Problem/Motivation

Split out from #2909472: Add value objects to represent the return of hook_requirements we should create enums for RequirementSeverity as a first step. We can deprecate drupal_requirements_severity() and move this to the enum.

Steps to reproduce

Proposed resolution

  • Create enum for RequirementSeverity and deprecate constants.
  • Deprecate drupal_requirements_severity() and moving this to the enum.

Remaining tasks

  • Handle BC for contrib modules that will still be using constants.

User interface changes

API changes

Data model changes

Release notes snippet

Drupal Usability Meeting 2024-01-05

$
0
0

This meeting takes place every Friday at 14:00 UTC (currently 7:00am PT, 10:00am ET). See Time.is to see what that is in your timezone.

The meetings are held using Zoom, and a link is posted in the #ux Slack channel 10 minutes before the meeting. Agenda is first come, first serve and set by attendees. Use the Needs usability review issue tag for issues that need review and/or suggest issues in comments here.

List of Slack users to ping 10 minutes before the meeting:
@Gábor Hojtsy (he/him), @worldlinemine, @lauriii, @AaronMcHale, @anmolgoyal74, @Antoniya, @Ravi, @shaal, @ckrina, @simohell, @gauravvv, @Mike Gifford (CivicActions), @Quynh, @yoroy, @EricRubino

This list gets copied to the issue for the next meeting. If that has already happened, then go to that issue to add/remove yourself to/from the list.

Recording of this week's meeting: TODO

Rough transcript of this week's meeting: Drupal Usability Meeting - 2024-01-05.txt

We discussed the following issue:

NR and RTBC issues marked Needs usability review.

The group is actively tracking progress on these issues:

Remaining tasks

  1. Add issue credits for the participants.
  2. Add the issue(s) we discussed to the issue summary and as related issues.
  3. Add a rough transcript.
  4. Add a link to the recording on YouTube.
  5. Comment on the issue(s) we discussed.

"is_expanded" is set to true even if "below" is an empty array

$
0
0

Problem/Motivation

MenuLinkTree::buildItems sets is_expanded if there are children and subtree data. But later on $element['below'] = $this->buildItems() can lead to all the "below" link items to be filtered out. This leads to cases where menu items are all filtered and twig thinking it should display an "expanded" indicator when no items are "below".

The comment in menu.html.twig file says:

is_expanded: TRUE if the link has visible children within the current menu tree.
below: The menu item child items.

This indicates to me that we are dealing with 2 different things. honestly the is_expanded shouldn't really be needed but is probably cruft from D6 or D7 days.

Steps to reproduce

The tests actually are in error already and they needed a fix to cover the exact bug being seen here.

Proposed resolution

TBD

Remaining tasks

Update issue summary

User interface changes

NA

API changes

NA

Data model changes

NA

Release notes snippet

NA

Link to Config Item from configuration synchronize page

$
0
0

Problem/Motivation

/admin/config/development/configuration displays a list of changed and updated config. Many times when the configuration is handled by a repository it is more appropriate to download one config change to the repository than the entire config (such as when a config change has been made on the devel instance needs to deploy to the whole stack. Individual config can be downloaded/uploaded at /admin/config/development/configuration/single/export and /admin/config/development/configuration/single/import, but there is no link from the synchronize page to these pages. It would aid this workflow to be able to link directly to the configuration item from the synchronization screen.

Proposed resolution

Change the button on /admin/config/development/configuration that says "view differences" to a drop-button with options to "View Differences", "Export this config", "Import to this config" with the items linking to the appropriate entry on the export/import page. This will require the following changes

  • Change "View Differences" button to drop-button
    • "View Differences" target remains as is
    • "Export this config" target is /admin/config/development/configuration/single/export?config_type={{type}}&config_name={{name}}
    • "Import to this config" target is /admin/config/development/configuration/single/import?config_type={{type}}&config_name={{name}}
  • Modify /admin/config/development/configuration/single/export and /admin/config/development/configuration/single/import to allow parameters for content_type and content_name

Remaining tasks

User interface changes

  • Change the "View Differences" button on /admin/config/development/configuration to a drop-button with the above options
  • Add ability to select config to export/import based on url parameters.

Release notes snippet

Link directly from Configuration Synchronization page to individual import/export.

Subsystem maintainer permissions on GitLab

$
0
0

Problem/Motivation

With the adoption of gitlab there a few challenges and oppertunities to have subsystem maintainers help out core committers with certian tasks.

Things like retargeting or closing merge requests. This is only possible for accounts with permissions on the drupal project.

This requires is being maintainer or developer. The issue with that is that this would give commit permissions. But we can fix that with branch permissions

https://docs.gitlab.com/ee/user/project/protected_branches.html

By protecting the release branches we can give more permissions to subsystem maintainers but also protect branches from commits by us.

Slack discussion: https://drupal.slack.com/archives/CGKLP028K/p1701285278934459

Steps to reproduce

Proposed resolution

Setup branch permissons.
Add subsystem maintainers to project/drupal.

Remaining tasks

  1. Collect subsystem maintainer usernames
  2. Setup branch permissions
  3. Test with single user
  4. Add all subsystem maintainers

User interface changes

API changes

Data model changes

Release notes snippet

BlockContentAccessControlHandler requires access block library permission for create

$
0
0

Problem/Motivation

Problem/Motivation

#3394741: BlockContentAccessControlHandler requires access block library permission for update, delete and revisions operations solved block access for update and delete but not create. The title left out "create" but several comments say that it works. Why as create left out? Hopefully this was just an oversight :)

Steps to reproduce

  1. Install Drupal
  2. Add a role that has edit any basic block content permission
  3. Try to create a block
  4. Get a 403

Proposed resolution

Change checkCreateAccess() to only check for 'create' and not 'access block library'.

Remaining tasks

  • See if the bot complains about the change
  • Write a test

Convert '_none' option to a constant and deprecate form_select_options()

Do not allow to save view with external Url in path (from page display)

$
0
0

Problem/Motivation

The current version of view allow users to set a external url in page path (which makes no sense). However, when users do that, the site breaks and throws the following error.

InvalidArgumentException: The internal path component 'https://example.com' is external. You are not allowed to specify an external URL together with internal:/. in Drupal\Core\Url::fromInternalUri() (line 422 of /var/www/html/core/lib/Drupal/Core/Url.php).

Steps to reproduce

  1. Go to /admin/structure/views and create a view with page display
  2. Add external Url (for eg: https://example.com/) in the path field in Page settings of the view and then Save the view
  3. Go back to /admin/structure/views page and you'll see the error

Proposed resolution

Add validation and throw error when user tries to add external url in view page field.

      if (UrlHelper::isExternal($uri_parts['path'])) {
        throw new \InvalidArgumentException("The internal path component '{$uri_parts['path']}' is external. You are not allowed to specify an external URL together with internal:/.");
      }

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

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.

Proposed resolution

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

Remaining tasks

Code review

User interface changes

The "Enable" operation is available to disabled text formats

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

Collapsed Details Element causes JS Error for required fields

$
0
0

Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Problem/Motivation

If you have an empty required field within a collapsed details element, when you submit the form it appears as nothing at all happens.

If you open up chrome Devtools, you will see the following error.
An invalid form control with name='name_of_field'

Steps to reproduce

  1. Create or visit a form with a collapsible details element with a required text field within it
  2. Leave the field empty and ensure the details element is collapsed
  3. Press Submit
  4. Nothing happens
  5. Refer to chrome devtools for error

Proposed resolution

Open the details element for invalid fields being targeted via JS

File: core/misc/details.js

  $('details input[required="required"]').on('invalid', (e) => {
    let $element = $(e.target).parent();
    handleFragmentLinkClickOrHashChange(e, $element);
  });

Remaining tasks

Respond to #19
Resolve comments in the MR

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

[10.2 regression] CKEditor 5 breaks when "Source"/Source editing button is added and "Manually editable HTML tags" are specified

$
0
0

Problem/Motivation

CKEditor breaks when "Source"/Source editing button is added and "Manually editable HTML tags" are specified

Steps to reproduce

  1. Define text format
  2. Enable some of the buttons / features
  3. Enable "Source" button
  4. Save text profile and it works
  5. Now edit again and add some "Manually editable HTML tags" in the "Source editing" plugin settings
  6. One can't save profile settings with error "The current CKEditor 5 build requires the following elements and attributes: LIST OF SOME TAGS The following elements are missing: LIST OF SOME OTHER TAGS"

Additionally, this happens if such text format was specified in 10.1.x, where this worked perfectly, but once updated to 10.2.x, pages using text format using source button with manually editable HTML tags will break with tags listed under LIST OF SOME OTHER TAGS" will not render and the pages look broken

Viewing all 296723 articles
Browse latest View live


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