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

If no Drupal 8 equivalent filter is found during migration, drop transformation-only filters, so that body fields show up

$
0
0

Problem/Motivation

Right now, when you complete a Drupal 8 migration, AFAICS in all cases, you get your node/comment titles moved over, but the bodies display as blank:

Titles, but no bodies.

The data for the fields is in the database, but getting stripped out on the front end.

According to the migrate team, this happens when filter formats not recognized by Drupal 8; they get migrated as filter_null, a filter that simply returns an empty string. However, to an "end user" it just appears that migrations don't work, even for very simple core cases where no fancy non-core input formats were used.

Major/Migrate critical because this represents a pretty significant usability hurdle, and harms user confidence in the system early on.

Proposed resolution

Instead, map mismatched filter formats to fallback_format (defaults to plain text).

The one possible reason not to do this is PHP code filter, where you could inadvertently expose database credentials that would now be exposed in plain text. However, we could probably deal with this case specially. (For example, explicitly setting that one to filter_null to indicate it needs attention.)

Remaining tasks

  • Write a patch + tests
  • Review it
  • Commit it!

User interface changes

By default, migrations will now display at least something for body field content for nodes and comments. (As well as other rich text fields.)

API changes

?

Data model changes

N/A?

Release notes snippet

Migrations now default to the fallback filter format, fixing a problem where rich text fields were not displaying post-migration.


Use version of guzzlehttp/guzzle ^6.5.2

Dblog event page for non-existing event returns 200, should be 404

$
0
0

Problem/Motivation

Accessing (as admin) a non-existing event details at admin/reports/dblog/event/ returns an empty page, it should return the 404 error page.

Proposed resolution

Throw NotFoundHttpException at the dblog controller for non-existing events.

Remaining tasks

Review path.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

TBD.

Disable Auto-populate Registration Form From Browser

$
0
0

Hi ,

The issue is after submitting registration form by site users form fields not clear its value so anyone see the major details of the previous user.

LoggerChannelFactoryInterface documentation references non-existent class

$
0
0

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Logger%21...

The documentation comment for LoggerChannelFactoryInterface::addLogger() references a non-existent Drupal class. This patch fixes that to point to the correct Symfony class:

-   * @see \Drupal\Core\DependencyInjection\Compiler\RegisterLoggersPass
+   * @see \Symfony\Component\HttpKernel\DependencyInjection\LoggerPass

This mistake was added in the original commit #1289536: Switch Watchdog to a PSR-3 logging framework - the class RegisterLoggersPass has never been a part of Drupal as far as I can tell.

Allow themes to declare dependencies on modules

$
0
0

Problem/Motivation

Parsing .info files for dependency information is already implemented on the modules administration page. Adding support for the same dependencies in theme.info files, and implementing the same behavior on the admin/build/themes page, would allow designers building heavily customized themes to make safer assumptions about their target sites.

A theme might require the existence of imagecache to auto-generate variations of a header image. This would be a nice compromise between systems like Wordpress and Joomla!, which give themes much greater control over the functionality of the site, and Drupal's module-centric approach.

It also creates following new UX requirements and non UI, API requirements

  1. Represent the list of dependent modules in themes list page. Display of missing/disabled dependent modules.
  2. Extension in Drush to download and enable modules dependent on themse.

Proposed resolution

  • Allow themes to add the dependencies to .info.yml files
  • Show these dependencies on /admin/appearance and make it impossible to install without the requirements
  • Install dependencies automatically on API level.

Original report by [eaton]

Issue Summary
Parsing .info files for dependency information is already implemented on the modules administration page. Adding support for the same dependencies in theme.info files, and implementing the same behavior on the admin/build/themes page, would allow designers building heavily customized themes to make safer assumptions about their target sites.

A theme might require the existence of imagecache to auto-generate variations of a header image. This would be a nice compromise between systems like Wordpress and Joomla!, which give themes much greater control over the functionality of the site, and Drupal's module-centric approach.

Convert file_create_url() & file_url_transform_relative() to service, deprecate it

$
0
0

Problem/Motivation

file_create_url() got no love at all during the D8 cycle.

Consequently, it's:

  1. still procedural
  2. calls \Drupal::service()four times, and uses a global
  3. is not unit testable

Additionally, in current D8, two additional problems arose:

  1. 90% of the calls need to be wrapped like this file_url_transform_relative(file_create_url($css_asset['data'])); because it generates absolute URL's and we want to avoid the url.site cache context whenever we can.
  2. Some of the calls that would like to use relative URLs currently can't because they need to pass the result as a Url object, and the problem is that non-absolute file_create_url() URL's are root-relative, so they contain the path that drupal is installed in. The Url class however doesn't accept that and can't deal with it. That is what #2646744: \Drupal\Core\Url does not accept root-relative (file) URLs, making it impossible to let LinkGenerator create root-relative file URL links is about. However, that is in my (berdir) opinion almost impossible to solve, because if you have /admin/foo without any further information, it's not possible to tell if /admin is now the base path or not.. Even if the base path really is /admin, it might still be an internal /-prefixed URL.

Proposed resolution

We have two possible options, but both involve adding a FileUrlGenerator service with methods to deal with this. The best way to fix the above problem is to return Url objects already from that service, at least when we need it. Initial versions had a method with an argument to get a relative/absolute URL, but that has been abandoned.

Option 1)
Add 3 dedicated methods for each use case: relative string: generate(), absolute string: generateAbsolute(), Url object: generateUrl(). Advantage is that *many* cases right now really do just need a string, but it leads to considerable duplication within the methods as the current implementation is designed to make it as efficient as possible. E.g. if we get a relative file URL, and want a relative result, we just generate that. And not a Url object or absolute URL just to make it then relative again like we do now.

Option 2)
Only add generateUrl(), if you want a string, use toString(), if you want it to be absolute, use setAbsolute()->toString(). That comes with a certain overhead when you don't need a Url object both in terms of code execution and also characters you have to type. But I more and more places deal with Url objects and the ->toString() thing is everywhere now.. entity toUrl/toLink, and we deprecated several other API's in favor of Url/Link .. toString(). It also allows us to improve cacheability metadata handling, as it can be added automatically.

The patch up until comment #130 implements Option 1, and I (again, berdir) initially believed that to be better, but I'm starting to reconsider. As far as the amount of calls on each of those calls go, these are the current numbers, identified with file.+->generate\(:
generate(): 76 calls in 32 files
generateAbsolute(): 35 calls in 13 files
generateUrl(): 6 calls in 5 files.

That does look it overwhelmingly points out that the separate methods are very useful. *But* a huge amount of those calls are actually in tests and are neither performance-relevant nor the main use case for DX. If I exclude those, it changes quite a bit:
generate(): 21 calls in 14 files
generateAbsolute(): 3 calls in 3 files
generateUrl(): 4 calls in 4 files.

Still considerably more generate() calls than generateUrl() but it does paint a more realistic picture.

Update

The decision was initially made to go with Option 2. However, considerable drawbacks were discovered while implementing that, for example because several related and underlying API's can only return strings and multiple conversions between Url object and back were necessary to display an image style for example. See #137for the details. Changing these API's is not feasible in the already large scope of this issue.

Because of that, this decision was reverted and starting with #151, the patch when back to an earlier version implementing Option 1.

Remaining tasks

Create a follow-up to deprecate the non-Url methods in Drupal 9, likely as a meta issue that first needs to update the related API's.#3087434: [meta] Use FileUrlGenerator::generateUrl() everywhere, then deprecate generate() and generateAbsolute()

Update #2646744: \Drupal\Core\Url does not accept root-relative (file) URLs, making it impossible to let LinkGenerator create root-relative file URL links after this is resolved. While the bug is not technically fixed, it becomes much less important as we can create a Url object directly instead of having to convert it.

User interface changes

None.

API changes

None.

Data model changes

None.

Multiple issues when PostgreSQL is used with non-public schema

$
0
0

I've tried to install Drupal 7 on 2 separate systems using a PostgreSQL 9.0 database backend, and both times it has failed at the same point.

The error message in the PostgreSQL logs both times is:

ERROR: null value in column "rid" violates not-null constraint
STATEMENT: INSERT INTO role_permission (rid, permission, module)
VALUES (NULL, 'administer blocks', 'block')

I followed the instructions in INSTALL.pgsql.txt, and everything else
installs up to this point.

The actual error message returned on the installation page is:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: http://bison:8089/install.php?profile=standard&locale=en&id=1&op=do
StatusText: OK
ResponseText:
Home | Drupal
@import url("http://bison:8089/modules/system/system.theme.css?0");
@import url("http://bison:8089/modules/system/system.messages.css?0");
@import url("http://bison:8089/modules/system/system.menus.css?0");
@import url("http://bison:8089/modules/system/system.base.css?0");
@import url("http://bison:8089/modules/comment/comment.css?0");
@import url("http://bison:8089/modules/field/theme/field.css?0");
@import url("http://bison:8089/modules/node/node.css?0");
@import url("http://bison:8089/modules/search/search.css?0");
@import url("http://bison:8089/modules/user/user.css?0");
@import url("http://bison:8089/modules/system/system.admin.css?0");
@import url("http://bison:8089/modules/system/system.maintenance.css?0");
@import url("http://bison:8089/themes/seven/reset.css?0");
@import url("http://bison:8089/themes/seven/style.css?0");
Home
Installation tasksChoose profile(done)Choose language(done)Verify
requirements(done)Set up database(done)Install
profile(active)Configure siteFinished
SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current
transaction is aborted, commands ignored until end of transaction
block

Steps to recreate:

Gentoo x64 (2.6.31 kernel)
Apache 2.2.15
PHP 5.2.14
PostgreSQL 9.0.3

1) Run: wget http://ftp.drupal.org/files/projects/drupal-7.0.tar.gz
2) Extract using: tar xvf drupal-7.0.tar.gz
3) Create destination directroy: mkdir /var/www/drupal-7.0
4) Copy files: mv drupal-7.0/* drupal-7.0/.htaccess /var/www/drupal-7.0
3) chgrp -R apache /var/www/drupal-7.0
4) Run: createuser --pwprompt --encrypted --no-createrole --no-createdb drupal
5) Run: createdb --encoding=UTF8 --owner=drupal drupal
6) Run: psql -U postgres -c "CREATE SCHEMA drupal AUTHORIZATION drupal;" drupal
7) Change to drupal dir: cd /var/www/drupal-7.0
8) Change permissions on default sites dir: chmod a+w sites/default
9) Create settings file: cp sites/default/default.settings.php sites/default/settings.php
10) Update settings permissions: chmod a+w sites/default/settings.php
11) Update sites/default/settings.php file as per INSTALL.pgsql.txt with schema name, by adding this line: $db_prefix = 'drupal';
12) Navigate to webpage and follow installation.
13) Error appears as described above.

Screenshots of installation attached.

Installation appears to work fine when using a schema named anything but "drupal", or not using a schema at all.


Implement Server Timing performance metrics

$
0
0

Problem/Motivation

Providing server timing would help developers estimate site performance.
The corresponding W3C specification is currently in "Working Draft" status and its already supported by Google Chrome and partially by Firefox.
https://www.w3.org/TR/server-timing/

Proposed resolution

Add Server-Timing header with relevant timing information.

Node Revision page for non-existing revision returns fatal error, should be 404

$
0
0

Node Revision page for non-existing revision returns fatal error such as "TypeError: Argument 1 passed to Drupal\Core\Entity\EntityViewBuilder::view() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in /Applications/MAMP/htdocs/drupal-8.9/core/modules/node/node.module on line 688 in Drupal\Core\Entity\EntityViewBuilder->view() (line 133 of /Applications/MAMP/htdocs/drupal-8.9/core/lib/Drupal/Core/Entity/EntityViewBuilder.php)"

steps to reproduce
1. Delete all node revisions
2. Update some node's it will add new revisions
3. Visit old revisions.

Convert config, config_environment module hook_help() to topic(s)

$
0
0

Problem/Motivation

#3041924: [META] Convert hook_help() module overview text to topics for the config, config_environment module(s).

Proposed resolution

Take the information that is currently in the hook_help module overview section for the module(s), and make sure the information is in one or more Twig help topic files. Steps:

  1. Find the hook_help() implementation function in the core/modules/MODULENAME/MODULENAME.module file(s). For example, for the core Contact module, the module files is core/modules/contact/contact.module, and the function is called contact_help().
  2. Locate the module overview portion of this function. This is located just after some lines that look something like this:
      switch ($route_name) {
        case 'help.page.contact':
    

    And ends either at the end of the function, or where you find another case 'something': line.

  3. We want to end up with one or more topics about the tasks that you can do with this module, and possibly a section header topic. So, read the help and figure out a good way to logically divide it up into tasks and sections. See Standards for Help Topics for information on how to do this.
  4. See if some of these tasks are already documented in existing topics. Currently, all topics are in core/modules/help_topics/help_topics. Note that to see existing topics, you will need to enable the experimental Help Topics module (available in the latest dev versions of Drupal 8.x).
  5. For each task or section topic that needs to be written, make a new Twig topic file (see Standards for Help Topics) in core/modules/help_topics/help_topics. You will need to choose the appropriate module prefix for the file name -- the module that is required for the functionality. Alternatively, if the information spans several modules or if the information should be visible before the module is installed, you can use the "core" file name prefix. For instance, it might be useful to know that to get a certain functionality, you need to turn on a certain module (so that would be in the core prefix), but then the details of how to use it should only be visible once that module is turned on (so that would be in the module prefix).
  6. File names must be MODULENAME.TOPICNAME.html.twig -- for example, in the Action module, you could create a topic about managing actions with filename action.managing.html.twig (and "MODULENAME" can be "core" as discussed above).
  7. Make a patch file that adds/updates the Twig templates. The patch should not remove the text from the hook_help() implementation (that will be done separately).

Remaining tasks

a) Make a patch (see Proposed Resolution section).

b) Review the patch:

  1. Apply the patch.
  2. Turn on the experimental Help Topics module in your site, as well as the module(s) listed in this issue.
  3. Visit the page for each topic that is created or modified in this patch. The topics are files in the patch ending in .html.twig. If you find a file, such as core/modules/help_topics/help_topics/action.configuring.html.twig, you can view the topic at the URL admin/help/topic/action.configuring within your site.
  4. Review the topic text that you can see on the page, making sure of the following aspects:
    • The text is written in clear, simple, straightforward language
    • No grammar/punctuation errors
    • Valid HTML -- you can use http://validator.w3.org/ to check
    • Links within the text work
    • Instructions for tasks work
    • Adheres to Standards for Help Topics [for some aspects, you will need to look at the Twig file rather than the topic page].
  5. Read the old "module overview" topic(s) for the module(s), at admin/help/MODULENAME. Verify that all the tasks described in these overview pages are covered in the topics you reviewed.

User interface changes

Help topics will be added to cover tasks currently covered in modules' hook_help() implementations.

API changes

None.

Data model changes

None.

Release notes snippet

None.

UpdateSettingsForm should call parent constructor

$
0
0

Problem/Motivation

UpdateSettingsForm inherited from ConfigFormBase which needs ConfigFactoryInterface as argument but it is not set, the form works because config has fallback to global \Drupal

Proposed resolution

Call constructor of parent or

Remaining tasks

decide on approach and commit

User interface changes

no

API changes

construction of form may change but constructors are not a part of BC

Data model changes

no

Release notes snippet

Performance issues with path alias generated queries on PostgreSQL

$
0
0

Problem/Motivation

Queries generated by AliasStorage::preloadPathAlias() taking huge amount of time to execute. A good example is the /admin/content page which takes 10 seconds and more to load for around 75k nodes.

SQL-Query example below:

2018-07-24 11:02:11 NZST [4923-1] drupal-site@drupal-site LOG:  duration: 10990.918 ms  statement: SELECT url_alias.source AS source, url_alias.alias AS alias, langcode AS langcode, pid AS pid
        FROM 
        url_alias url_alias
        WHERE ((source::text ILIKE '/node/28') OR (source::text ILIKE '/node/29') OR (source::text ILIKE '/node/30') OR (source::text ILIKE '/node/31') OR (source::text ILIKE '/node/24') OR (source::text ILIKE '/node/25') OR (source::text ILIKE '/node/26') OR (source::text ILIKE '/node/27') OR (source::text ILIKE '/node/23') OR (source::text ILIKE '/node/211996') OR (source::text ILIKE '/user/13') OR (source::text ILIKE '/node/87382') OR (source::text ILIKE '/node/134983') OR (source::text ILIKE '/user/25222') OR (source::text ILIKE '/node/216888') OR (source::text ILIKE '/node/149705') OR (source::text ILIKE '/node/216524') OR (source::text ILIKE '/node/209767') OR (source::text ILIKE '/user/24341') OR (source::text ILIKE '/node/216536') OR (source::text ILIKE '/node/135065') OR (source::text ILIKE '/user/53277') OR (source::text ILIKE '/node/173142') OR (source::text ILIKE '/user/30085') OR (source::text ILIKE '/node/188349') OR (source::text ILIKE '/user/69670') OR (source::text ILIKE '/node/147160') OR (source::text ILIKE '/node/147245') OR (source::text ILIKE '/node/174863') OR (source::text ILIKE '/user/59491') OR (source::text ILIKE '/node/216527') OR (source::text ILIKE '/node/174530') OR (source::text ILIKE '/node/178984') OR (source::text ILIKE '/node/154121') OR (source::text ILIKE '/node/172192') OR (source::text ILIKE '/node/216869') OR (source::text ILIKE '/user/93926') OR (source::text ILIKE '/node/216876') OR (source::text ILIKE '/node/216881') OR (source::text ILIKE '/user/93929') OR (source::text ILIKE '/node/215571') OR (source::text ILIKE '/user/58627') OR (source::text ILIKE '/taxonomy/term/50463') OR (source::text ILIKE '/node/202776') OR (source::text ILIKE '/user/47599') OR (source::text ILIKE '/node/210401') OR (source::text ILIKE '/node/215338') OR (source::text ILIKE '/node/87208') OR (source::text ILIKE '/node/190312') OR (source::text ILIKE '/node') OR (source::text ILIKE '/user/1')) AND (langcode IN ('en', 'und'))
        ORDER BY langcode ASC NULLS FIRST, pid ASC NULLS FIRST

Not sure what part of Drupal this issue is actually coming from path alias or PostgreSQL driver.

Proposed resolution

1. Lower all existing aliases in url_aliases so that no ILIKE condition is required any more.
2. Make sure all new aliases are stored lowercase.

Remaining tasks

Finalize patch

User interface changes

None

API changes

Data model changes

Path comparison (e.g. for block visiblity) doesn't work for aliased internal paths with capital letters (block_block_list_alter() in D7)

$
0
0

Short description of the problem: both sides of the string comparison must be lowercased, but the (system) path isn't lowercased…

D7 + D8 are affected by this bug.

-----

API page: https://api.drupal.org/api/drupal/modules%21block%21block.module/functio...

When the path patterns are compared with the current path the block_block_list_alter() function says:

// Compare the lowercase internal and lowercase path alias (if any).

For the comparison of the aliased path everything is fine. But in the 2nd comparison with the internal path there is a missing drupal_strtolower() call for the internal path ($_GET['q']).

So the bugfix would be an easy replacement of the line
$page_match = $page_match || drupal_match_path($_GET['q'], $pages);
with
$page_match = $page_match || drupal_match_path(drupal_strtolower($_GET['q']), $pages);
.

Or is there any mechanism that "auto"-lowercases $_GET['q']? I don't know such a mechanism...

To reproduce the bug create an internal path (e.g. for a Views page or with hook_menu()) that contains at least 1 capital letter. Create an URL alias for that path. Enter the internal path as visibility page for any block and check that the block visibilty doesn't work as expected.

Views block_content revision relation should have revision_user field

$
0
0

Problem/Motivation
If we create any view for "custom block" and try to revel data about "custom_block_author" our best bet is to open up revision for this block_content, so we can fetch "revision_user" data from "block_content_revision" table. But when we use the relationship to add "block_content_revision" in the fields section we can not found "revision_user" data as one of the field data.

Proposed resolution
Create a views field which can expose "revision_user" data.

YAML for import

langcode: en
status: true
dependencies:
  module:
    - block_content
    - user
_core:
  default_config_hash: msYnighLW1IbiBfyQbwbQwb2cU-5LECiFryt60k0Nfk
id: block_content
label: 'Custom block library'
module: views
description: 'Find and manage custom blocks.'
tag: default
base_table: block_content_field_data
base_field: id
core: 8.x
display:
  default:
    display_plugin: default
    id: default
    display_title: Master
    position: 0
    display_options:
      access:
        type: perm
        options:
          perm: 'administer blocks'
      cache:
        type: tag
        options: {  }
      query:
        type: views_query
        options:
          disable_sql_rewrite: false
          distinct: false
          replica: false
          query_comment: ''
          query_tags: {  }
      exposed_form:
        type: basic
        options:
          submit_button: Apply
          reset_button: false
          reset_button_label: Reset
          exposed_sorts_label: 'Sort by'
          expose_sort_order: true
          sort_asc_label: Asc
          sort_desc_label: Desc
      pager:
        type: mini
        options:
          items_per_page: 50
          offset: 0
          id: 0
          total_pages: null
          tags:
            previous: '‹ Previous'
            next: 'Next ›'
          expose:
            items_per_page: false
            items_per_page_label: 'Items per page'
            items_per_page_options: '5, 10, 25, 50'
            items_per_page_options_all: false
            items_per_page_options_all_label: '- All -'
            offset: false
            offset_label: Offset
      style:
        type: table
        options:
          grouping: {  }
          row_class: ''
          default_row_class: true
          override: true
          sticky: false
          caption: ''
          summary: ''
          description: ''
          columns:
            info: info
            type: type
            changed: changed
            operations: operations
          info:
            info:
              sortable: true
              default_sort_order: asc
              align: ''
              separator: ''
              empty_column: false
              responsive: ''
            type:
              sortable: true
              default_sort_order: asc
              align: ''
              separator: ''
              empty_column: false
              responsive: ''
            changed:
              sortable: true
              default_sort_order: desc
              align: ''
              separator: ''
              empty_column: false
              responsive: ''
            operations:
              sortable: false
              default_sort_order: asc
              align: ''
              separator: ''
              empty_column: false
              responsive: ''
          default: changed
          empty_table: true
      row:
        type: fields
      fields:
        info:
          id: info
          table: block_content_field_data
          field: info
          relationship: none
          group_type: group
          admin_label: ''
          label: 'Block description'
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: string
          settings:
            link_to_entity: true
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          entity_type: null
          entity_field: info
          plugin_id: field
        type:
          id: type
          table: block_content_field_data
          field: type
          relationship: none
          group_type: group
          admin_label: ''
          label: 'Block type'
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: entity_reference_label
          settings:
            link: false
          group_column: target_id
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          entity_type: block_content
          entity_field: type
          plugin_id: field
        changed:
          id: changed
          table: block_content_field_data
          field: changed
          relationship: none
          group_type: group
          admin_label: ''
          label: Updated
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          entity_type: block_content
          entity_field: changed
          type: timestamp
          settings:
            date_format: short
            custom_date_format: ''
            timezone: ''
          plugin_id: field
        operations:
          id: operations
          table: block_content
          field: operations
          relationship: none
          group_type: group
          admin_label: ''
          label: Operations
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          destination: true
          entity_type: block_content
          plugin_id: entity_operations
      filters:
        info:
          id: info
          table: block_content_field_data
          field: info
          relationship: none
          group_type: group
          admin_label: ''
          operator: contains
          value: ''
          group: 1
          exposed: true
          expose:
            operator_id: info_op
            label: 'Block description'
            description: ''
            use_operator: false
            operator: info_op
            identifier: info
            required: false
            remember: false
            multiple: false
            remember_roles:
              authenticated: authenticated
              anonymous: '0'
              administrator: '0'
          is_grouped: false
          group_info:
            label: ''
            description: ''
            identifier: ''
            optional: true
            widget: select
            multiple: false
            remember: false
            default_group: All
            default_group_multiple: {  }
            group_items: {  }
          entity_type: block_content
          entity_field: info
          plugin_id: string
        type:
          id: type
          table: block_content_field_data
          field: type
          relationship: none
          group_type: group
          admin_label: ''
          operator: in
          value: {  }
          group: 1
          exposed: true
          expose:
            operator_id: type_op
            label: 'Block type'
            description: ''
            use_operator: false
            operator: type_op
            identifier: type
            required: false
            remember: false
            multiple: false
            remember_roles:
              authenticated: authenticated
              anonymous: '0'
              administrator: '0'
            reduce: false
          is_grouped: false
          group_info:
            label: ''
            description: ''
            identifier: ''
            optional: true
            widget: select
            multiple: false
            remember: false
            default_group: All
            default_group_multiple: {  }
            group_items: {  }
          entity_type: block_content
          entity_field: type
          plugin_id: bundle
      sorts: {  }
      title: 'Custom block library'
      header: {  }
      footer: {  }
      empty:
        area_text_custom:
          id: area_text_custom
          table: views
          field: area_text_custom
          relationship: none
          group_type: group
          admin_label: ''
          empty: true
          tokenize: false
          content: 'There are no custom blocks available. '
          plugin_id: text_custom
        block_content_listing_empty:
          admin_label: ''
          empty: true
          field: block_content_listing_empty
          group_type: group
          id: block_content_listing_empty
          label: ''
          relationship: none
          table: block_content
          plugin_id: block_content_listing_empty
          entity_type: block_content
      relationships: {  }
      arguments: {  }
      display_extenders: {  }
    cache_metadata:
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url
        - url.query_args
        - user.permissions
      max-age: -1
      tags: {  }
  page_1:
    display_plugin: page
    id: page_1
    display_title: Page
    position: 1
    display_options:
      display_extenders: {  }
      path: admin/structure/block/block-content
      menu:
        type: tab
        title: 'Custom block library'
        description: ''
        parent: block.admin_display
        weight: 0
        context: '0'
        menu_name: admin
      relationships:
        id:
          id: id
          table: block_content_field_revision
          field: id
          relationship: none
          group_type: group
          admin_label: 'Get the actual block content from a block content revision.'
          required: false
          entity_type: block_content
          entity_field: id
          plugin_id: standard
      defaults:
        relationships: false
    cache_metadata:
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url
        - url.query_args
        - user.permissions
      max-age: -1
      tags: {  }

Argument 1 passed to Drupal\Core\Config\Entity\ConfigEntityBase::calculatePluginDependencies() must implement interface Drupal\Component\Plugin\PluginInspectionInterface, null given, called in core/lib/Drupal/C

$
0
0

When creating a new custom field type, extend the class fileItem for the new custom field type.

Go to content type add custom field type created and save, the website encounters an error

TypeError: Argument 1 passed to Drupal\Core\Config\Entity\ConfigEntityBase::calculatePluginDependencies() must implement interface Drupal\Component\Plugin\PluginInspectionInterface, null given, called in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php on line 388 in core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php on line 27

Firefox browser in english changes date & hour input format on node form w datefield.

$
0
0

We are using a date field with the "Date and time" as format on two node types. The site is using the 'dutch' language and the detection settings is set to 'chosen language'. No browser or other setting has been selected. The dateformats are in DD/MM/YY HH:MM:SS

What behavior were you expecting?
The input format should be DD/MM/YY HH:MM:SS

What happened instead?
When visiting the node create/edit form with an firefox browser that has an english interface, it switches the format to the english counterpart, e.g: MM/DD/YY AM/PM. This does not seem to happen with chromium based browsers. Tested using the latest vivaldi ,edge chromium browser and firefox

See screenshots for reference.

Add context filtering capabilities to the core translation interface

$
0
0

I tried to export translation by context, but core doesn't offer such a filter. So I had to use the https://www.drupal.org/project/locale_translation_context module and it works very well.

Because that module overrides a lot of core code to introduce its new context filter for the export and the translation overview page, I would suggest to add this functionality into core (see https://www.drupal.org/project/locale_translation_context/issues/3104577... ).

Maybe a core maintainer can answer his opinion if a patch is welcome or not?

Messages should have role=status instead of role=contentinfo

$
0
0

Problem

Messages currently have a role="contentinfo" wrapper for status messages (compared with role="alert" for error messages).

contentinfo is inappropriate here, because it's supposed to be for information about the document as a whole, not status updates. It's a landmark role, and there should only be one such contentinfo region per page. It's intended to serve the same purpose as a top-level HTML footer element. Using contentinfo for messages may be present some confusion for users who navigate by landmark regions.

Proposed resolution

Use role="status" as the wrapper for messages instead. Like role="alert", it is an ARIA live region, so assisitive technology can treat them accordingly. Some (not all) browser + screen reader combinations announce these regions after a page loads, so users will have a quicker understanding of what happened after submitting a form.

Translations directory not autocreated, leading to obscure errors

$
0
0

Problem/Motivation

In some situations the translations directory (where downloaded translation files get stored; e.g. sites/default/files/translations) is missing. This may happen for example in a development process, where a site is re-created on a dev machine from git and a live DB but without populating the files directory (as you use StageFileProxy).

Simplified steps to reproduce in a normally working site (translations directory = sites/default/files/translations)

$ rm -r sites/default/files/translations
$ drush locale-update

Example error messages:

 [notice] File temporary://filejmiMlj could not be moved/copied because the destination directory translations:// is not configured correctly.
 [error]  Unable to download translation file https://ftp.drupal.org/files/translations/8.x/admin_toolbar/admin_toolbar-8.x-1.24.de.po. 
 [warning] fopen(translations://admin_toolbar-8.x-1.24.de.po): failed to open stream: "Drupal\locale\StreamWrapper\TranslationsStream::stream_open" call failed PoStreamReader.php:154
 [warning] fgets() expects parameter 1 to be resource, boolean given PoStreamReader.php:248
 [notice] Unable to import translations file: translations://admin_toolbar-8.x-1.24.de.po

Proposed resolution

- Autocreate the directory if at the start of the batch check/update process.

Remaining tasks

- Find other other processes where the translation directory is yet not auto-created.

User interface changes

none

API changes

none

Data model changes

none

Viewing all 293086 articles
Browse latest View live


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