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

[meta] Set Drupal 11 platform and browser requirements at least six months before the release

$
0
0

Problem/Motivation

In #3118147: [meta] Set Drupal 10 platform and browser requirements six months before the release we're setting Drupal 10 platform and browser requirements.

Due to release cycles, the MySQL and sqlite version requirements are unlikely to change much for Drupal 10, however it already looks more clear what we should raise them to in Drupal 11.

Proposed resolution

Define some 'not less than' minimum version requirements for Drupal 11.


[meta] Release Drupal 11, possibly in 2024

theme_fieldset() should allow any non-empty-string #title

$
0
0

Currently, theme_fieldset() uses empty() to determine whether or not to display a title for the fieldset. This means that a #title such as a zero will not be displayed. The attached patch converts #title to a string and displays the title unless the string is the empty string.

Steps to reproduce: Create a fieldset with a title of zero. It will not appear, but it should.

Adds tests of createWithSampleValues

$
0
0

Problem/Motivation

Trying to create sample nodes found the issues linked.

Proposed resolution

How do you test random?

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

New views are always created with query type "views_query"

$
0
0

When creating a view through the UI (with a wizard), it seems the query type saved with the view will always be set to views_query, even if the base table uses another query plugin.

As far as I can see, this is the fault of WizardPluginBase::defaultDisplayOptions(), which is hard-coded to always set the query type to views_query, without looking at the base table's data (which it does for something else, so it's definitely "allowed"). And since it's not actually possible to edit the used query plugin, once set it will never be changed (I think).

Since the view internally still looks at the base table data for loading the right query plugin, this isn't that much of a problem, but it will to config schema validation errors, since the wrong type is used for the query options.

"Top" reports - sorting by message is weird if messages have variables

$
0
0

If you try the Top Search Phrases report (admin/reports/search), and click on the Message column to sort by the message, the messages are not sorted alphabetically. See screen shot.

I have also tried clicking repeatedly to change from forward to reverse sorting order, and the sort order does not change.

Other "top" reports do not seem to have this same problem, just the top search phrases report.

Difference between "Autocomplete" and "Autocomplete (tags style)" is not entirely clear for site builders

$
0
0

Problem/Motivation

The Entity Reference field has two display widgets: "Autocomplete" and "Autocomplete (Tags style)".
Both widgets allow users to add new taxonomy terms to a vocabulary as long as "Create referenced entities if they don't already exist" is enabled on the edit tab of the field. Terms cannot be added if that tick box is not ticked.

Proposed resolution

Since there doesn't seem to be any difference in the functionality of the two widgets "Autocompelete (Tags style)" could be removed.

Remaining tasks

User interface changes

API changes

Missing schema for display_options.defaults.sitename_title

$
0
0

Problem/Motivation

Create view with attached views.view.test.yml

Schema fails to validate. For example install the config_inspector module and run "drush inspect_config"
views.view.test:display.feed_1.display_options.defaults.sitename_title missing schema

Attach patch fixes it

Steps to reproduce

Steps to reproduce:

  1. Create view show content of type all
  2. Create a page and include an RSS feed
  3. Edit the feed display, edit title for "this feed (override)" and enable "Use the site name for the title"

From #8

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Contact form opt-out line should be excluded from admin-sent and sender-copy e-mails

$
0
0

I just noticed that when an admin sends an email to a user, it has this message:

Brad Landis (site/user/1) has sent you a message via your
contact form (site/user/12/contact) at siteName.

If you don't want to receive such e-mails, you can change your settings at
site/user/12.

Ironically, even if you change the settings, the admin can still contact you, which was the case for this email. If the admin user sends the email, this message should not be included.

Add property to identify if checkbox/radio is in group of checkboxes/radios

$
0
0

Problem/Motivation

I tried to identify if a checkbox / radio is part of checkboxes / radios. For proper form theming I require to add a CSS class to single form elements that are of type checkbox / radio, but not if these checkbox / radio is part of a group of checkboxes / radios.

After long debugging I found \Drupal\Core\Render\Element\Checkboxes class, but it is far away from doing something reliable for this themers situation. My findings have shown that there are no good keys in checkbox/radio render arrays that indicate if the element is a checkbox / radio of checkboxes / radios - except abusing some other keys like:

  1. #error_no_message = TRUE
  2. #weight =
    • data type integer (value = 0) - if a single checkbox
    • data type float (value = 0.001+) - if multiple checkboxes

Proposed resolution

Add key '#is_group_of_elements' = TRUE to the element to indicate that a checkbox/radio is part of a checkboxes/radios group.

Remaining tasks

Patch
Review
Commit

User interface changes

None

API changes

No breaking change, just an addition.

Data model changes

None.

autocomplete widget doesn't warn about field cardinality, loses data silently

$
0
0

To reproduce:

- create a reference field, say on article nodes
- set its widget to autocomplete
- create a new article node
- enter one node title in the widget and let it autocomplete
- enter a comma and start typing another node title
- the widget lets you do this: it should not.
- save the node
- the node saves: it should not. The form should fail validation
- edit the node: only the last entered node title is shown
- check the DB: only the last entered node was saved in the field value

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'wid' doesn't have a default value

$
0
0

hi ! i had build profiles setup install system Drupal . My database installed successful in step "Setup database" . I have error when i submit form step "Configure site" ..this show error"SQLSTATE[HY000]: General error: 1364 Field 'wid' doesn't have a default value" . I posted issues hope someone guide for me how to do fix error this ? Thanks

Allow password on registration without disabling e-mail verification

$
0
0

Problem/Motivation

When configuring password behaviour on the registration form, there is no way to force the rendering of the password fields on the registration form if e-mail confirmation is enabled.

An option to configure / force the password fields on the user registration form, while e-mail verification is enabled, might offer a way for site owners to alter the process and make it fit more to their case. (flexibility++)

There is a module that offers this behaviour in Drupal 7, called User Registration Password, the current concept patch started with code that's partially based on this module, but evolved a bit beyond this.

Proposed resolution

Develop a patch that offers minimal functionality. Patch exists, see #58.

Remaining tasks

User interface changes

  • Adds 1 checkbox on the 'admin/config/people/accounts' page.
  • The patch will add 2 extra e-mail templates for sending a welcome and activation e-mail.

API changes

  • Adds 1 new variable: 'password_register'.

Screenshots

Before:
password option before
After:
password option after

First screenshot:
First screenshot
Second screenshot:
Second screenshot

Possible checkbox combinations:

[X] Require e-mail verification when a visitor creates an account.
[_] Require people to choose a password during registration.
This is the first screenshot, people are not able to set a password during registration, because verification is enabled.

[X] Require e-mail verification when a visitor creates an account.
[X] Require people to choose a password during registration.
This is the second screenshot, people are required to set a password during registration, while verification is enabled.

[_] Require e-mail verification when a visitor creates an account.
[..] Require people to choose a password during registration.
No separate screenshot, but this is the same as the second screenshot, users need to set a password during registration and are directly authenticated after submit. [..] is the disabled checkbox (via #states).

Notes

This patch overrides the 'status' on the submit form for new users and set the status to '0' (disabled). This makes it possible to facilitate our new option and functionality with minimal changes to the existing code.

The current patch also implements a change in user_pass_reset() to facilitate re-sending password_register activation e-mails to users that never logged in yet. (and also didn't receive the first activation e-mail.) They can re-request it via the password reset page.

For Drupal 8 the current patch works, but while it does already improve the account options a bit, some wonder if we should implement this as-is, without implementing some new account status workflow first.

For Drupal 9 we might want to think about refactoring the workflow even more, really decouple the password option from the 'verify' code, and maybe even implement a workflow for accounts, but most people agree to continue with the current patch / idea and focus on more / bigger changes in D9.
(possible future issue: Decouple 'email verify' and 'password' options.)

Original report by finalternatives

Hi, I run a daily news site and have been getting a lot of complaints about people who say it is confusing to log in using the temporary password. Is it possible to have people choose their own password when signing up? Ideally they would then receive an email telling them to click on the link to verify the account. My guess is that people log in the first time and then are too lazy to change the password, and when they return to the site they can’t log in again.

Does anyone have any other ideas for streamlining the registration/login process to make it more user friendly?

Field Groups marked as required are missing red asterisk

$
0
0

Problem/Motivation

When using the field group module, groups that contain required fields are not styled to have the red asterisk to denote that group has required fields. The form-required class is in the mark, but no styles for it.

Steps to reproduce

  1. Added fields to a node that are required
  2. Create fields groups
  3. Ensure the Mark group as required if it contains required fields. option is selected for a group
  4. Observe when creating content that the red asterisk is missing

Proposed resolution

Update the styles to account for this. The core/themes/claro/css/components/form.pcss.css has some styles already for the form-required class, but they are too specific. I would think making this style selector less specific would fix it, but there could create issues if the after pseudo element is intended for other use.

How to set original language for views? (follow-up)

$
0
0

This issue is follow-up to How to set original language for views?.

I installed a second language (Swedish) and set it as default in /admin/config/regional/language.
Now all my views suddenly show Swedish as original language, which means I can not translate them to Swedish.
It is not recommended to change the default language on a working site.
How do I change them back to English?

The biggest problem for me appeared if I trying to translate contrib's views. I edit Svenska (original) and change strings to Svenska, and all is OK for a while. But suddenly at one point on time this changes are reseted.

What should I do?


Decide if views should default to having a language filter.

$
0
0

This is to decide if views should filter results by the current page language by default (but still be configurable to not filter by language).

[PP-1] Error "Column 'langcode' in field list is ambiguous" thrown due to TranslationLanguageRenderer not rendering a field from a relationship

$
0
0

Problem/Motivation

Views has a system in order to render fields in different languages. Either it's determined from a langcode which is part of the result, or it's taken from the current content / interface language, or simply a hardcoded langcode.

While the basic case works fine, the rendering by langcode of the current row [which is the default in Views] does not support using a relationship.

Example:

  • Add a text field to the User entity, and edit a user account to populate it.
  • Create a node from this author.
  • Create a node view, displaying fields (not teasers)
  • Add the author as relationship
  • Add the text field from User to the display
  • Select the translation to be based upon the row language [default setting]

You'll end up in an exception similar to this [shown exception is from a Taxonomy relationship, but User exception is similar]:

Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'langcode' in field list is ambiguous: SELECT node_field_data.title AS node_field_data_title, node_field_data.nid AS nid, node_field_data.langcode AS node_field_data_langcode, taxonomy_term_field_data_node_field_data.name AS taxonomy_term_field_data_node_field_data_name, taxonomy_term_field_data_node_field_data.vid AS taxonomy_term_field_data_node_field_data_vid, taxonomy_term_field_data_node_field_data.tid AS taxonomy_term_field_data_node_field_data_tid, users_field_data_node_field_revision__users.uuid AS users_field_data_node_field_revision__users_uuid, taxonomy_term_field_data_node_field_data__taxonomy_term_data.uuid AS taxonomy_term_field_data_node_field_data__taxonomy_term_data, node_field_data.created AS node_field_data_created, users_field_data_node_field_revision.uid AS users_field_data_node_field_revision_uid, langcode AS langcode FROM {node_field_data} node_field_data LEFT JOIN (SELECT td.*, tn.nid AS nid FROM {taxonomy_term_field_data} td LEFT JOIN {taxonomy_index} tn ON tn.tid = td.tid WHERE (td.vid IN (:db_condition_placeholder_1)) ) taxonomy_term_field_data_node_field_data ON node_field_data.nid = taxonomy_term_field_data_node_field_data.nid INNER JOIN {node_field_revision} node_field_revision ON node_field_data.vid = node_field_revision.vid LEFT JOIN {users_field_data} users_field_data_node_field_revision ON node_field_revision.uid = users_field_data_node_field_revision.uid INNER JOIN {users} users_field_data_node_field_revision__users ON users_field_data_node_field_revision.uid = users_field_data_node_field_revision__users.uid INNER JOIN {taxonomy_term_data} taxonomy_term_field_data_node_field_data__taxonomy_term_data ON taxonomy_term_field_data_node_field_data.tid = taxonomy_term_field_data_node_field_data__taxonomy_term_data.tid WHERE (( (node_field_data.status = :db_condition_placeholder_0) )) ORDER BY node_field_data_created DESC LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => tags ) in Drupal\Core\Database\Connection->query() (line 581 of core/lib/Drupal/Core/Database/Connection.php).

Proposed resolution

The problem is in the following piece of code:

    $langcode_key = $this->entityType->getKey('langcode');
    foreach (array('data_table', 'revision_table', 'base_table') as $key) {
      if ($table = $this->entityType->get($key)) {
        $table_alias = $query->ensureTable($table);  // HERE
        $this->langcodeAlias = $query->addField($table_alias, $langcode_key);
        break;
      }
    }

This code is trying to add the right 'langcode' field to an entity table in the view, basically by guessing what table it needs to add it to. So, $table is found, in this example, to be {users}. By default views doesn't know how to join from {node} to {users}.
In order to be able to do that, it has to take into account the relationship. Also, the langcode field that is added may need to have a better alias.

The solution is to pass along the relationship and leverage it.

Remaining tasks

Postponed on #2457999: Cannot use relationship for rendered entity on Views, which may fix this.

User interface changes

API changes

Allow install profiles to change the system requirements

[meeting] Migrate Meeting 2022-06-09 2100Z

$
0
0

Hello all, it’s time for the weekly migration subsystem meeting. The meeting will take place in slack in various threads
This meeting:
➤ Is for core migrate maintainers and developers and anybody else in the community with an interest in migrations
➤ Usually happens every Thursday and alternates between 1400 and 2100 UTC.
➤ Is done on the #migration channel in Drupal Slack (see www.drupal.org/slack for information).
➤ Happens in threads, which you can follow to be notified of new replies even if you don’t comment in the thread. You may also join the meeting later and participate asynchronously!
➤ Has a public agenda anyone can add to. See the parent issue for an idea of the typical agenda.
➤*Transcript will be exported and posted* to the agenda issue. For anonymous comments, start with a :bust_in_silhouette: emoji. To take a comment or thread off the record, start with a :no_entry_sign: emoji.

Core migration issues

Next video meeting 2022-07-07 2100Z (tentative)

The hope is that most or all of the maintainers will attend. We will try to focus on longer-term goals than in the weekly meeting.

[meeting] Migrate Meeting 2022-06-02 1400Z

$
0
0

Hello all, it’s time for the weekly migration subsystem meeting. The meeting will take place in slack in various threads
This meeting:
➤ Is for core migrate maintainers and developers and anybody else in the community with an interest in migrations
➤ Usually happens every Thursday and alternates between 1400 and 2100 UTC.
➤ Is done on the #migration channel in Drupal Slack (see www.drupal.org/slack for information).
➤ Happens in threads, which you can follow to be notified of new replies even if you don’t comment in the thread. You may also join the meeting later and participate asynchronously!
➤ Has a public agenda anyone can add to. See the parent issue for an idea of the typical agenda.
➤*Transcript will be exported and posted* to the agenda issue. For anonymous comments, start with a :bust_in_silhouette: emoji. To take a comment or thread off the record, start with a :no_entry_sign: emoji.

Core migration issues

Next video meeting 2022-07-07 2100Z (tentative)

The hope is that most or all of the maintainers will attend. We will try to focus on longer-term goals than in the weekly meeting.

0️⃣ Who is here today? What is the most frustrating thing about working with Drupal?

mikelutz (he/him)Hey all. I'm off work this week, but lurking.
danflanagan8I guess I’m here. I get frustrated by MRs in the issue queues. I’m a patcher!
MatroskeenHey!A few times I spent some good amount of time and then realized that my problem can be solved via enabling 1 checkbox or applying a patch, because it was already solved by someone.
quietoneHello. I get frustrated waiting for patch reviews.

1️⃣ What should we talk about today? Suggest topics here and I will add threads. I will also check for comments on the issue for today's meeting.

2️⃣ Action items. To be added later.

3️⃣ Statistics

benjifisherFixed since last week's meeting: none (not counting the issue for the meeting).
benjifisherRTBC: 8, 1 of which is Major.
benjifisherGoogle sheet for recording stats: https://docs.google.com/spreadsheets/d/1o0Rjlc1vnnLP5bM5P-SMMyGzqn7258hi...
benjifisherNR: 22, including 2 Critical, 2 Major, and 3 that have not been updated in more than two months.
benjifisher@mikelutz (he/him): I updated the spreadsheet: every other week to the beginning of 2022. The last 3 columns are now monotonic.Probably it is not perfect, but when do you ever have really clean data? :wink:
mikelutz (he/him)I don't think such a thing exists, lol

4️⃣ Comment in this thread if you are looking for ways to help. Give us some idea of what you would like to do: documentation, code review, testing, project management, ...

5️⃣ Previous minutes.

benjifisher
benjifisherIs there anything to follow up? Anything need to be changed in those minutes?

6️⃣ Announcements

MatroskeenRecently I was told that I was nominated for the 2022 Aaron Winborn Award.There was a hint in the message so I know who it is - his person is hanging out in this channel very often, so I want to say I'm very grateful and it is my pleasure to be with such people in the same community.Thank you! :heart: (edited)

7️⃣ Add content in tests only when needed (NR) (edited) 

benjifisher#3266491: Add content in tests only when needed#comment-14544852
benjifisherThis issue was previously RTBC. Tests started failing because of changes to how we use PHPStan. We got tests to pass by adding some more ignore rules for PHPStan, and that change needs review.
mikelutz (he/him)Did we open a follow up to fix the underlying problem?
benjifisherI did not. I wonder if there is already a meta-issue for fixing all the PHPStan issues that we are currently ignoring.
danflanagan8I just set it to RTBC again. Hopefully core committers will buy the reasonaing on adding to phpstan baseline in this case. :crossed_fingers:
benjifisherI will expand on that explanation.
benjifisherBTW, that issue is why I noticed the problem with ComposerHooksTest. Thanks for giving me the link to the issue for that.
benjifisherThere is a meta issue #3190585: [META] Run PHPStan on Drupal core, but it does not have children for fixing the baseline errors.
benjifisherThis issue is Closed (fixed), but it has several open child issues for fixing the baseline problems: #3178534: Start running PHPStan on Drupal core (level 0)

8️⃣ $migration_dependencies has inconsistent structure

benjifisher#3262395: $migration_dependencies has inconsistent structure
benjifisherThis issue is RTBC, but I see the message

Can not add test, MR is not mergeable

It looks as though tests have not run since 2022-05-05.

benjifisherLet me see if I can update the MR.
benjifisherThe branch rebased cleanly, and that seems to have triggered a test (since the issue is still RTBC).
benjifisherAs discussed in 9️⃣:I just realized that the problem is that the MR targets 9.4.x, and I have been rebasing on 9.5.x.

9️⃣ Patches vs. MRs

benjifisher@danflanagan8 mentioned in 0️⃣ a preference for patches, and I think that @quietone has the same preference.Is this something fundamental, or is it because there are still problems with how MRs are integrated with Drupal CI and d.o issues?
danflanagan8My big problem with MRs is that it’s too hard to pick up an issue that someone else started working on and then abandoned.
danflanagan8I can’t change the target branch right?
danflanagan8But I do indeed see benefits for big issues that people are going to start working on and then finish. But abandoned MRs are the worst.
benjifisherCan't you get push access to the feature branch?I am sure that you can create a new branch in the issue fork, but that usually adds to the confusion.
danflanagan8Can’t you get push access to the feature branch?Yeah, does that give permission to change the target branch then?
benjifisherOh, the target branch: you mean like changing it from 9.5.x to 10.0.x?
danflanagan8yes
benjifisherLet's test: can you try to update the MR for #3262395: $migration_dependencies has inconsistent structure?
danflanagan8good idea
danflanagan8trying now
benjifisherThat is the issue for 8️⃣. I just realized that the problem is that the MR targets 9.4.x, and I have been rebasing on 9.5.x.
danflanagan8I got push access, but I don’t see anywhere I can edit the MR:
benjifisherI see the same thing. Have you tried the 9.4.x link?
danflanagan8yeah, that just brings me to that branch, away from the MR
benjifisherI did not try it, since I do not want to interfere with your test.
danflanagan8Well I think my test is over…
benjifisherOh, you do not have the Edit button, do you?
benjifisherupper right-hand corner
danflanagan8correct
danflanagan8and that’s where you get to change the target branch, right?
benjifisherThere is a channel to talk about GitLab integration: #gitlab? We can ask there about getting edit access to the MR. Also, I wonder how hard it would be to add the branch ...
MatroskeenI think with MRs you also can't run tests against multiple Drupal branches (like 10.0.x, 9.5.x). Or I made this up? :thinking_face:
xurizaemonI really want to like MRs, they are much better workflow IMO but as noted have some challenges still.

When patch files were the norm, community process tended to treat patches as "immutable enough" - the barrier to breaking a patch was high (modify a file on d.o infra). With MR patch URLs this is no longer the case (#3204538). For the process of building codebases MR .patch URLs aren't as suitable.

For quick collab/development they are IMO better (and perhaps encourage quicker turnaround). Where issues take longer to land, the abandonment issues and such here start to show up. (edited)

danflanagan8Yes, using an active MR in a project is dicey for sure. I recently posted a patch to an issue with an “active” MR because I want to use it in a client project. I put “active” in quotes because it hadn’t been touched in 9 months after being RTBC at one point. So close! But hard for me to pick up and get over the finish line because I can’t change the target branch as discussed above.
quietoneYes, right now I prefer patches, except for coding standards issues, where the 'unresolved' feature of the GitLab UI is very helpful. Hmm, maybe my preference is more about the number of lines changed?No, there is more flexibility with testing a patch in different environments on d.o than on GitLab. But we are in a transition phase so I just have to be patient.

1️⃣0️⃣ Wrap up

benjifisherThanks for participating! I will update 2️⃣. Please continue to add comments in the threads. In 1-7 days, we will post a transcript for today's meeting.
Viewing all 293832 articles
Browse latest View live


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