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

Add composer installer-paths by default

$
0
0

Problem/Motivation

composer/installers installs packages to the correct location based on the specified package type. Drupal core composer/installers since forever (#2373197: Reference Composer Installers as a dependency of a Drupal project) but it is not configured properly so far. Contrib modules should go to modules/contrib. Contrib themes should go to themes/contrib etc.

Proposed resolution

Add a good default configuration for installer-paths. This will improve the ootb experience for composer based workflows.

Remaining tasks

User interface changes

API changes

Data model changes


Update location.hash when clicking a vertical tab

$
0
0

Problem/Motivation

This ability to link to a vertical tab was introduced in #376293: Activate current vertical tab from URL fragment and has been merged. You currently can use the case-sensitive vertical tab id as the hash, but without knowing how this works users cannot link to specific tabs.

For example if I wanted to link a user to authoring information I would need to know that in Drupal 8 I would need to add #edit-author to the end of the URL. Ideally when authoring information is clicked the window hash should be updated to reflect the tab that is open.

Proposed resolution

When clicking the vertical tab, the URL in the browser should be updated with the relevant hash of the tab. If this URL is entered in to a new browser said tab should be open by default and brought in to the users view.

Before clicking on the vertical tab link switches the tab pane, but does not change the hash in the URL bar:

Only local images are allowed.

After clicking on the vertical tab link (including mouse and keydown) switches the tab pane AND changes the hash in the URL bar:

Only local images are allowed.

After pasting this URL with the preserved hash into a new window highlights the relevant tab and scrolls down to it:

Only local images are allowed.

Remaining tasks

Backport to 8.2.x (Should be the same patch)
Backport to 7.x potentially based on patch #2 which was created for 7.38

User interface changes

Minimal changes. A page with a hashed URL will be scrolled down, and focused on the relevant vertical tab. If the relevant tab is not the default open tab, the default will be closed and the tab from the hash will be opened.

API changes

N/A

Data model changes

N/A

Database API docs refer to deprecated procedural code

ContextInterface needs documentation

$
0
0

Problem/Motivation

/**
 * Interface for context.
 */
interface ContextInterface extends ComponentContextInterface {

Proposed resolution

?

Remaining tasks

Write something.

User interface changes

API changes

Wrong validation messages in Datelist::validateDatelist()

$
0
0

Problem/Motivation

If a datetime field is invalid, the error message is too generic. It is unclear what field is incorrect, especially if there are multiple datetime fields on the entity (color alone is not sufficient).

This is a bug because

  • Incorrect or misleading user interface text

and would qualify for an 8.1.x minor release.

Proposed resolution

Update error message for invalid datetime fields to include the field label.

Remaining tasks

Add test coverage for date-only fields.

User interface changes

Better error messages for invalid datetime fields.

API changes

None.

Data model changes

None.

Original Report

The validation handler for datelist \Drupal\Core\Datetime\Element\Datelist::validateDatelist form element has wrong error messages.

$form_state->setError($element, t('The %field date is required.'));

and

$form_state->setError($element, t('The %field date is invalid.'));

Add setting to disable logging of searches (7.x)

$
0
0

There is no way to set the watchdog messages ON/OFF for searched content, and which may lead to unnecessary database consumption.

Convert Node's Migrate source tests to new base class

BrowserTestBase should implement AssertMailTrait for backwards compatibility


Confusing error response set by ContentTypeHeaderMatcher when forgetting the Content-Type request header

$
0
0

Problem/Motivation

While working on expanding the HTTP POST test coverage in #2737719: EntityResource: Provide comprehensive test coverage: for every entity type, every format, every method, I noticed that when the developer forgets to specify the Content-Type request header that they get this rather cryptic message:

{"message":"No route found that matches \u0022Content-Type: \u0022"}

Those \u0022 should be interpreted as "double quote". So it's repeating the literal Content-Type request header: both the key and its value, and the value just happens to be NULL, which PHP casts to the empty string.

Proposed resolution

Detect when the Content-Type request header is not set and provide a more helpful error response:

No "Content-Type" request header specified.

Remaining tasks

Do it.

User interface changes

None.

API changes

None.

Data model changes

None.

The method Drupal\Core\Database\Query\Condition::compile is too long and complex

$
0
0

The method Drupal\Core\Database\Query\Condition::compile is too long and complex, and very deeply nested. That results in a very high cyclomatic complexity. Is there any way we can break it up into a series of sub-methods? At minimum, it looks like the main foreach()'s body could get split off to a sub-method. There may be others, or it may just to too complex to do, but it would be great if we could at least try.

Testing issue: Convert WTB to BTB by just moving classes and changing use statements

$
0
0

Problem/Motivation

In order to convert more tests from WTB to BTB we want to get some estimation of what kind of failures might exist as part of the conversation

Proposed resolution

This issue should provide a gigantic patch which does the following and JUST the following:

Instructions how to work with this patch:

  • Apply the patch
  • Look at a test failure
  • Figure out whether a) There is some missing stuff in BTB, open a follow issue for that. Exclude this particular test for now with a documentation about which issue this is blocked on b) If this test needs manual adaption, try to create issues for them as well
  • When you changed anything at the script run the following:
    rm -Rf core/modules && git checkout 8.3.x core/modules && php browsertest-convert.php && git add core/modules

Remaining tasks

User interface changes

API changes

Data model changes

Search results should respect the content type's "Display author and date information." option

$
0
0

Updated: Comment #77 (comments before #70 are too old to be very useful)

Problem/Motivation

Node content types have a setting "Display author and date information." that allows a site builder to show/hide this information on a per-content type basis. This is not respected in search results.

Proposed resolution

Check this setting from the template.

Remaining tasks

Decide if it's actually possible / practical to fix this issue (see #70)
Write and review the patch

User interface changes

No admin changes. Search results will no longer show this information that should not be shown.

API changes

None

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryBug because the UI says "don't display the author/date" but Search is violating this, so it violates expectations.
Issue priorityJust a normal bug.
Prioritized changesThe main goal of this issue is to fix a usability bug, which is a prioritized change (both Usability and Bugs are prioritized). As a side effect, we also updated uses of drupal_render() (which is deprecated) to use the Renderer service instead, so that is also a Good Thing.
DisruptionNot disruptive, no API change.

REST requests with invalid X-CSRF-Token header get "missing " mesage

$
0
0

Follow-up to #2681911: REST requests without X-CSRF-Token header: unhelpful response significantly hinders DX, should receive a 401 response

Problem/Motivation

      if (!$this->csrfToken->validate($csrf_token, self::TOKEN_KEY)&& !$this->csrfToken->validate($csrf_token, 'rest')) {
        return AccessResult::forbidden()->setReason('X-CSRF-Token request header is missing')->setCacheMaxAge(0);
      }

This message notifies that a token is missing even if one is given that just isn't valid.

Proposed resolution

Provide different messages if a token is provided versus when one is given but its invalid? Just make the message more generic?

Remaining tasks

User interface changes

API changes

Data model changes

[meta] Add backwards compatibility layer to browsertestbase to ease conversion from webtestcase

$
0
0

Problem/Motivation

To ease conversion from WebTestCase, we're adding a bc layer to browsertestbase so that assertions don't have to be converted when tests are.

Some of these might be deprecated, some might be actually useful and need to be part of the API.

This should happen before conversions land so that there is minimal work to do apart from the conversion itself.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Moderation states with the same name is unclear ...

$
0
0

Few months ago I posted similar issue to WB : 2750365; however, based on this comment CM is going to be completely redesigned. Until that happens, moderation states with same name remains unclear.

Moderation state transition list page looks much better than the one in WBM, but on the other hand more confusing.

Current CM list page:

before

Proposed solution:

after


Allow custom cache expiry per-form

$
0
0

This is a follow up to #2091511: Make cache_form $expiry configurable, to mitigate runaway cache_form table or key:value store growth, and should go in after it lands.

Yes, @stefan_r talked about this in IRC. Don't think I have the logs, but I recall what we talked about.

First, a little background. I independently arrived at the same solution we have in #79 during the course of working on a site that led to #2341447: Possible Denial of Service Attack with {cache_form}. So, this isn't necessarily just about a performance improvement or keeping a database small; a runaway {cache_form} can crash a system. In my case, it was caused by a bad bot and led to a severe crash (total database corruption, had to reinstall mysql and restore backups). That truly sucked.

We have three options on the table here, and they aren't necessarily mutually exclusive:

1. Change the TTL to a global setting. This is what #79 does.

2. Make the TTL configurable per form in $settings.php. This would essentially be

$expire = variable_get('form_cache_expiry_' . $form_id, 21600);
3. Add a special form element #cache_expiry, and people could form_alter to their individual needs. #75 shows this.

It is totally possible to combine the above and come up with a flexible solution.

As we decide on a solution, we need to keep a few things in mind.

- This is likely only a problem with a few forms on a few sites. My case was a public node_form where nodes had lots of fields.
- We can't ignore site owners and site builders who may not be or have developers available at the necessary time. I think this rules out #3 above.
- We need to implement something with minimal disruption, even if the disruption is to a small subset of users. Remember the itok patch? Remember the followups because it caused problems for some site owners? We need to avoid that.

I think the last point above should be at the forefront of our minds given the state and maturity of Drupal 7. I think we are reasonable sure that #1 above wouldn't break anything in core alone (though DRUPAL_MAXIMUM_TEMP_FILE_AGE being the same value concerns me a bit). However, our test coverage of Drupal 7 isn't as good as Drupal 8, and we can't be sure if contrib or custom modules have made any assumptions about the expiration being 6 hours. Do we know of any? I don't think so. Is is possible? Definitely. Would the problems that this would cause be easy to debug? I don't think so.

Problems created by this would potentially cause the loss of user-input (not true data loss from the database, but still vanished into the ether), I think we need to extra precautious about side effects.

I think the TTL being 6 hours is way too high, but it has been that way for a long, long time. Given the audience needing this including site owners and working towards the goal of minimal disruption, I think we need to go with option #2 here. So, I am setting this back to Needs Work so we can

- update the hunk in form.inc/form_set_cache to take the $form_id into account
- update and polish the docs in default.settings.php
- i think this warrants a change record, which can also be used in the docs for further reference

Not sure if I will get to a new version of the patch tonight.

WSOD after renaming and deleting a views display

$
0
0

Steps to reproduce:

  1. create a view
  2. add a first block display
  3. save the view
  4. add a second block display
  5. rename the second block display machine name to new_machine_name
  6. delete the second block display
  7. save the view

At this point the view is saved but a warning message appears:

Plugin ID 'new_machine_name' was not found.

If you go to /admin/structure/views you will get a WSOD:

Uncaught PHP Exception Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: "The "" plugin does not exist." at /var/www/example.com/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 52, referer: http://example.com/admin/structure

You need to manually delete the view from the database in order to restore the site.

Make $modules property protected on BrowserTestBase and KernelTestBase

$
0
0

Problem/Motivation

For the conversion to PHPUnit as part of #2807237: PHPUnit initiative the $modules property must be protected since it is sometimes used as protected on old Simpletests. Otherwise PHPUnit will throw fatal errors and the converted test case with the protected $modules property cannot be executed.

Proposed resolution

Make $modules protected on BrowserTestBase and KernelTestBase.

Use something like

find . -path './.git' -prune -o -not \( -name '*.js' \) -type f -exec sed -i -e 's/public static $modules/protected static $modules/g' {} \;

Remaining tasks

Patch.

Add legacy assertFieldByXPath()/assertNoFieldByXPath() method for browser tests

$
0
0

Problem/Motivation

For better compatibility with existing Simpletests we should try to provide assertFieldByXPath(), but mark it as deprecated. That way we need to change fewer parts of a test when converting from Simpletest to BrowserTestBase.

Proposed resolution

Implement the method, test it in BrowserTestBaseTest.

Remaining tasks

Patch.

User interface changes

None.

API changes

None.

Data model changes

None.

Redesign the status report page

$
0
0

Problem/Motivation

The current status report is informative but not highlighting the crucial information really well. A lot of key information gets lost in the rows of green, blue and other color indicators. From a design point of view this page could also be a lot more appealing.

Proposed resolution

We are looking for designers to pick up this page and propose a view alternatives. Yoroy and Bojhan will be available to guide any designers.

Remaining tasks

  • Come up with alternative designs
  • Discuss and iterate on them
  • Choose
  • Implement (from the list that started in #208)
    1. grey SVG icons in general info
    2. The error and warning icons on the detail summaries
    3. The word "found" after warning and errors
    4. Cron button positioning for desktop
    5. Disable details toggling on desktop
    6. Missing Intro copy (#227)
    7. Toolbar vert issue (#227)
    8. Cron information (#227 and #228)

User interface changes

The information will be separated in 3 regions:

Error counter at top

3 items with error/warning/checked if there are errors. Link to each item list.
Re-count of items checked if no errors. Link to item list.

General system information table

The aim for this region is to show the basic
info about the development environment.

  • Drupal version
  • Last cron run
  • Button to run cron
  • Web server info
  • PHP info
  • Database info
List of reports
  • Separated lists by Errors, Warnings and Checked.
  • The title for each list should be an anchor for each
    counter in the top regiom.
  • On mobile, thedescription is collapsed by default.

Designs

Status page (no errors)

Status page no errors

Status page (with errors)

Status page with errors

Status page (mobile)

Status page with errors on mobile

API changes

None

Data model changes

None

Original report by [username]

Viewing all 291765 articles
Browse latest View live


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