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

bartik (d8 core) menu tablet with only shows 2 columns of buttons

$
0
0

Bartik menu drupal 8 has 3 states depending on width: Tabs, 3-column buttons, hidden menu. In a browser under windows (tested with firefox & chrome), as you narrow width, the display changes to 3 column buttons. Narrow more and it changes to 2 column buttons, but it leaves enough room for a third column! Narrow more, and the buttons get narrower, still leaving room for another column.

It looks like the design was to leave enough room for 3 columns, but the last column might not have enough room???

At any rate, it would be nice for tablet users if the full 3 columns were available at differing widths. (at least, until the with switches to the narrow, "phone" menu.)

I've included images if the tabs menu, 3 column menu, 2 column with space menu.

This issue also shows on my android phone (wide view) and tablet (narrow view), where I only get 2 columns of buttons even though there is room for three.


REST View Displays: Add support for top-level property additions

$
0
0

Problem/Motivation

Currently REST Views displays cannot make use of Header or Footer areas. These are commonly used for typical HTML views to feature information about the first row, add aggregation data, or simply inject arbitrary content. The same is also needed in collections, such as introducing result counts or adding a "version" property.

Proposed resolution

Add support for Header Areas or a new type of views row plugin that allows one or more properties to be added to the view for merge into the collection structure.

Remaining tasks

Identify path forward, implement.

User interface changes

This would open up new options in the Views UI. This would allow additions to REST collection output.

These are not breaking changes, except in anti-pattern API clients that fail on unrecognized properties in data payloads.

API changes

?

Data model changes

None.

Custom CSS classes added to status messages print on page as content when using Classy theme or subthemes

$
0
0

Problem/Motivation

When using template_preprocess_status_messages() to add classes to the class attribute of the wrapper element of status messages, if using the Classy theme, or a subtheme of Classy that does not implement its own instance of status-messages.html.twig, the classes appear as content below the messages element (not just as an attribute value in the markup).

Proposed resolution

Patch file attached.

Remaining tasks

Needs community review.

User interface changes

The values of the class attribute will no longer appear as page content beneath the status messages element.

API changes

None.

Data model changes

None.

Views REST: Improved UX of exposed sorts in collections

$
0
0

Problem/Motivation

When creating exposed sorts for collections, the Views UI does not provide insight into the parameter structure for the querystring. As a result, developers unfamiliar with the URL syntax will need to create a "regular" view, save it, navigate to the page, and experiment with the exposed form to see what it does. The Views UI should surface more of the key identifiers.

Proposed resolution

Much like exposed fields will show you the identifier for the field's querystring parameter in the field plugin's modal popup, the exposed search popup should provide insight into the sort_by, sort_order properties and their accepted values. This might be mitigated by a module such as Self-Documenting REST API providing this information.

Remaining tasks

Determine approach

User interface changes

Additions to the views admin UI.

API changes

None expected.

Data model changes

None expected.

Make it possible to link to an entity by UUID

$
0
0

Problem/Motivation

It would be great to provide URLs with UUIDs in their so you can link to them.

For poormans menu staging you could use menu_link_config and store refs to UUIDs, like <code>/{entity_type}/{uuid}.

Proposed resolution

Add a new entity link format: {entity_type}/{uuid} - e.g. viewing /node/68d0a104-a5bf-466c-a429-f871d91f9580 is same as viewing node/3.
Allow URIs like entity:node/68d0a104-a5bf-466c-a429-f871d91f9580
Add a new uuid link template for entities:

$node->toUrl('uuid');

Remaining tasks

User interface changes

API changes

None

Blocks should not be loaded just to determine whether they are visible

$
0
0

Problem/Motivation

We use BlockRepository::getVisibleBlocksPerRegion() to determine which blocks are visible on the current page load. Currently, this involves:

  • Loading every single block for the current theme
  • For each block, checking $block->access(), which involves:
    • Loading a lazy plugin collection of conditions
    • For each condition, applying contexts
    • For each condition, evaluating the condition
    • For each condition, bubbling up cacheable metadata
    • Checking whether the block plugin itself allows the block to be shown

This is really slow. In an recent analysis, it took 117 ms on each uncached page load.

Most of these steps aren't strictly necessary. Consider what we do when we want to display a list of nodes: Instead of loading each node individually and then checking $node->access(), we instead use the node_access system, which generates a single query to check access on nodes. We should do something similar for blocks.

Proposed resolution

  • Have BlockRepository use a query to filters out blocks that aren't visible
  • Allow visibility conditions to opt into this system by implementing a new interfaces
  • Maintain compatibility with conditions that do not opt-in

A module I wrote might be a good starting point, at least as inspiration: https://github.com/vasi/block_access_records

Remaining tasks

  • Discuss.
  • Implement.

User interface changes

None.

API changes

  • A new interface for conditions to implement..
  • Possibly an extension to BlockAccessControlHandler, to allow it to check only those conditions that haven't been already applied-via-query.

Data model changes

A new table to store block access records (or whatever we decide to call them).

Programatically added Menu link is not removed after removing the code.

$
0
0

Updated: Comment #19

Problem/Motivation

A programatically added menu item is not removed from the menu after the menu link code has been removed.

Steps to reproduce

  • Create a module with a single route and callback.
  • Add a menu link to the route using an implementation of hook_menu_link_defaults(). Add the menu link to the 'main' menu (for convenience).
  • Enable the module.
  • Check that the menu link appears in the main menu.
  • Remove the code from MODULE_menu_link_defaults().
  • Clear the cache
  • Observe that the menu link is stil in the main menu.

Proposed resolution

Remaining tasks

User interface changes

API changes

Migrate truncate process plugin

$
0
0

A process plugin to truncate text is needed.


D6->D8: Migrating links without leading slash leads to fatal error

$
0
0

Steps to reproduce:
- Set up a D6 content type with a link field
- Enter a link URL like "test", something without a protocol or leading slash
- Run a D6 to D8 migration. It runs smoothly.
- Try to visit the migrated node. You'll get an error.

In either 8.0.5 or 8.1 head the result is a fatal error.

This is also an issue for Search API, since it will kill the entire search.

InvalidArgumentException: The URI 'test' is invalid. You must use a valid URI scheme. in Drupal\Core\Url::fromUri() (line 306 of core/lib/Drupal/Core/Url.php).

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 title as the hash, either URL encoded using + instead of space or with spaces, but not %20.

When using a URL fragment (hash) to link to a vertical tab, if you then select another vertical tab that has an "add another item" button then the response will trigger the currently set window.location.path and window.location.hash and you will jump to the vertical tab with that combined path/hash.

This is actually patched off of 7.38. I am adding the novice tag for someone to reroll off latest HEAD. Plus we will probably have to do this to Drupal 8 first as well.

I am guessing there may be some more intricacies for this but for now this fixes the aforementioned issue.

Patch coming below.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Simplify REST configuration

$
0
0

Problem/Motivation

Currently (and also after #2308745: Remove rest.settings.yml, use rest_resource config entities) the rest configuration is quite flexible / verbose.

+  GET:
+    supported_formats:
+      - hal_json
+    supported_auth:
+      - basic_auth
+  POST:
+    supported_formats:
+      - hal_json
+    supported_auth:
+      - basic_auth
+  PATCH:
+    supported_formats:
+      - hal_json
+    supported_auth:
+      - basic_auth
+  DELETE:
+    supported_formats:
+      - hal_json
+    supported_auth:
+      - basic_auth

Problems

  • Realistically you don't want different formats for different HTTP methods
  • You also don't want different authentication for different HTTP methods

Proposed resolution

Make it possible (optionally_ on the config entity level to just specify

a) the list of formats of your entire resource
b) the list of authentication methods of your resource
c) the exposed HTTP methods

At the end it could then look like the following:

<code>
methods:
  - GET
  - POST
  - PATCH
  - DELETE
formats:
  - hal_json
authentication:
  - basic_auth

Remaining tasks

  1. #2308745: Remove rest.settings.yml, use rest_resource config entities
  2. #2721595: Simplify REST configuration

User interface changes

API changes

Data model changes

Add pager to draggable entity overviews

$
0
0

The taxonomy overview page is limited to 50 vocabularies as specified in EntityListBuilder but not showing a pager.

You can add a review, opinion, greeting, etc. comment type but not change the "Add new comment" text

$
0
0

Problem/Motivation

Follow-up to #2228763: Create a comment-type config entity and use that as comment bundles, require selection in field settings form. At the moment the comment form heading always says "Add new comment" on the form. If you have a specific comment type like "Greeting" you probably want it to say "Write greeting" instead.

Proposed resolution

Provide settings on the comment type config entity, similar to "Submission form settings" for content types where you can configure the form heading (defaults to "Add new comment"). The "Comments" label is taken from and can already be modified in the field settings.

Remaining tasks

Do it.

User interface changes

New setting on the field.

API changes

Likely none. Config schema is expanded.

Data model changes

Config is expanded.

Fragment link pointing to <textarea> should be redirected to CKEditor instance when CKEditor replaced that textarea

$
0
0

Clicking on a link in the inline form errors summary error on top of a form scrolls a linked problematic field into view (like an anchor).
This however doesn't work for CKeditor enabled fields, because the original field is hidden.

This is a major issue since we have non-functional links.

Support @dependencies or @require module in phpunit kernel tests

$
0
0

Follow-up to #2722731: Convert MissingDependentModuleUnitTest back to a Simpletest test
Follow-up to #2721355: MissingDependentModuleUnitTest has the wrong namespace

Problem/Motivation

This will I assume be expected functionality for feature parity coming from simpletest unit tests. This is related to #1273478: Fully implement @requires and mark tests with unmet requirements as 'skipped' but implements the phpunit side only and fulfills the existing @todo in KernelTestBase.

Proposed resolution

Implement code to handle our custom requirement testing and copy MissingDependentModuleUnitTest or something very similar with the accepted annotation in the Kernel test namespace.

Remaining tasks

Decide on annotation.

User interface changes

API changes

Additional annotation for phpunit kernel tests.

Data model changes


Menu links created via Views cannot save their row weight

$
0
0

Following on from this forum post https://www.drupal.org/node/2659292

I have isolated the issue as something specific to Views.

Basically on Drupal 8.03,
if you Add new view,
Create a page, in PAGE SETTINGS
Create a menu link,
The created menu item is unable to save it's row weights setting permanently
If you go to the relevant Edit Menu screen and change the order of the menu items either through drag n dropping
or manually changing using show row weights,
the changed configuration is only saved in the temp cache and not in the database
and when the the cache is redrawn the menu items are restructured alphabetically as they don't have any saved row weights.
Even the order you create the menus in doesn't matter as no row weight is saved they're automatically restructured in alphabetical order.

This bug only affects menu items created by Views, menu items created manually or via other modules seem fine, disabled Views menu items also seem to be renabled at cache redraw

To test and replicate issue
I made a fresh install of Drupal 8.0.3 at a windows localhost environment and a linux server environment and did nothing else but create new content types and create pages for them using Views with no other modules installed or different than default settings and the issue seemed to be persistent on both cases. It is a wide spread bug that needs addressing, hopefully in a non destructive way with existing Drupal 8 sites.

WSOD on admin/modules if description is set but is NULL in module.info.yml

$
0
0

I created a custom module with a blank "description" in the modules .info.yml file, e.g.:

name : emptytest
description :
type: module
core : 8.x

Trying to visit the Extend / module list page shows "The website encountered an unexpected error. Please try again later." and an error in the Watchdog log:

InvalidArgumentException: $string ("") must be a string. in Drupal\Core\StringTranslation\TranslatableMarkup->__construct() (line 140 of core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php)

The problem originates at line 209 in core/modules/system/src/Form/ModulesListForm.php

    $row['description']['#markup'] = $this->t($module->info['description']);

To reproduce, create an empty module with just a module info.yml as shown above, and visit the Extend page.

Proposed solution is to test for $module-info['description']):

    $row['description']['#markup'] = $this->t(isset($module->info['description']) ? $module->info['description'] : '');

There might be a better way, e.g. to highlight the missing description before we get to this point, or disable the module. According to https://www.drupal.org/node/2000204 the description should be required/mandatory.

ajax.js insert command sometimes wraps content in a div, potentially producing invalid HTML and other bugs

$
0
0

Problem/Motivation

Prior to #39, Drupal.AjaxCommands.prototype.insert() always added a DIV wrapper to the content returned by the server. Since #39, it only does that if the content isn't already contained in a single root element. The current HEAD code is:

      // For legacy reasons, the effects processing code assumes that new_content
      // consists of a single top-level element. Also, it has not been
      // sufficiently tested whether attachBehaviors() can be successfully called
      // with a context object that includes top-level text nodes. However, to
      // give developers full control of the HTML appearing in the page, and to
      // enable Ajax content to be inserted in places where DIV elements are not
      // allowed (e.g., within TABLE, TR, and SPAN parents), we check if the new
      // content satisfies the requirement of a single top-level element, and
      // only use the container DIV created above when it doesn't. For more
      // information, please see http://drupal.org/node/736066.
      if (new_content.length !== 1 || new_content.get(0).nodeType !== 1) {
        new_content = new_content_wrapped;
      }

There are multiple conditions where even the more limited DIV wrapping creates problems (see comments #41-#48).

Proposed resolution

Figure out if we can improve ajax.js to never require the DIV wrapper. Specifically:

// For legacy reasons, the effects processing code assumes that new_content
// consists of a single top-level element.

Can we fix that?

// Also, it has not been
// sufficiently tested whether attachBehaviors() can be successfully called
// with a context object that includes top-level text nodes.

Can we test/fix that?

Remaining tasks

User interface changes

API changes

Original report by @peterpoe

As a workaround for a Safari bug, ajax.js wraps new content inside an empty div after a successful ajax request:

    // Manually insert HTML into the jQuery object, using $() directly crashes
    // Safari with long string lengths. http://dev.jquery.com/ticket/3178
    var new_content = $('<div></div>').html(response.data);

The div makes inserting content not at block level (like in table rows and spans), difficult to achieve. I have published a workaround for Drupal 6 here: http://drupal.org/node/472328

Since the corresponding bug has been solved in Safari since 2009-03-19, I think that both Safari 3.2.3 and 4.x won't crash anymore with long strings. Given that Safari 3 has is used by 0.3% of web users, my opinion is that the limitations posed by the workaround are now worse than the problem solved.

Attached patch changes the behavior to:

    var new_content = $(response.data);

Menu subtrees in menu blocks show all subitems regardless of the active menu item

$
0
0

Problem/Motivation

When visiting a page which belongs to a child menu tree, menu block displays other trees on the same level, from different parents, when the parents are set to expanded.

E.g. using the following structure:

- Home
- Events
-- Event 1
--- About Event 1
--- Subscribe to Event 1
-- Event 2
--- About Event 2
--- Subscribe to Event 2

when the user sets the menu block to level three, they expect the subtrees under either Event 1, or Event 2 to show. Instead, when visiting the About Event 1 page, not only the items from Event 1 show, but also the Event 2 subtree:

  • About Event 1
  • Subscribe to Event 1
  • About Event 2
  • Subscribe to Event 2

Proposed resolution

If this behaviour is to be retained, then introduce a new option to the menu block configuration that ensures that the menu trail is followed and only the relevant subtree is shown. When the menu itself is rendered, we need to find the correct menu root and display the relevant subtree.

Remaining tasks

Improve the UI text which explains what the Follow menu trail option means on the menu block configuration.

User interface changes

If the current behaviour is to be retained, then we need to implement this as an additional feature, introducing an interface on the menu block configuration.

API changes

N/A

Data model changes

New configuration schema for the follow option.

vasi's test issue

$
0
0

Helper issue for patches I'm working on.

Viewing all 295817 articles
Browse latest View live