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

Improve rendering account link in the toolbar


Update failed

$
0
0

Update from 8.6.1 to 8.6.2 gives a "unexpected error..."
There was one update in update.php: contextual module.

Disable contextuale module en quick edit module don't solve the problem.

Inconsistent ordering of views of content in Umami

$
0
0

Problem/Motivation

I have set up the Umami demo on my local machine and on simplytest.me.

The order of articles/recipes on the home page is inconsistent.

Local:

Simplytest.me

This is because all the recipes/articles all have the same creation time, so the sort is undefined.

This in no ways impacts Umami when used as a demo, but does make it more difficult to A/B test changes, especially if we start using BackStop or similar to check for regressions.

Proposed resolution

Add creation dates to the content – either fixed or relative to the install date.

Array to string conversion after trying to run unit tests

$
0
0

Problem/Motivation

When Drupal requires you to enable some PHP extensions we get the next error:

Array to string conversion
/var/www/html/d8.loc/core/includes/install.core.inc:2181
/var/www/html/d8.loc/core/includes/install.core.inc:1028

An array is set for the requirements (core/modules/system/system.install in line 242), but string is expected.
E.g. we use 'description' element as string in install.core.inc (line 2181).

Proposed resolution

Render inline_template before set to requirements.

Remaining tasks

None

User interface changes

None

API changes

None

[META] Stabilise Migrate Drupal Multilingual module

$
0
0

Problem/Motivation

Migrate multilingual data from D6 and D7.

Proposed resolution

D6 migration and much of D7 is working so use those migrations, and their plugins as models for these migrations. It is preferred to improve the existing destination plugins instead of creating new ones.

Remaining tasks

Because D6 is nearing end of life, the D6 multilingual migrations are the highest priority as shown in the list below.

Top Priority

Drupal 6 nodes and configuration settings to support nodes.

High priority - remaining content migrations

Drupal 7 - Drupal 8 Entity Translation migrations

Multilingual taxonomies / content migrations

Comments

Medium Priority

Multiligual vocabularies

Everyting else than multilingual vocabularies

Low Priority

Optimize Drupal\Core\Template\Attribute

$
0
0

Problem

Drupal\Core\Template\Attribute has become a bit of a God class with too many responsibilities. Move CSS Class parsing code off to its own class and apply some speed improvements to the logic of the class.

Issue History Note

This issue ticket was began over two years ago with the Twig rendering system. There are references in the older patches to Twig Environment and the then concurrently being developed assertion system. As of the most recent patch these references are removed. This issue thread is maintained for needed context for the code reviewers. The remaining Twig issues have their own issues.

<?php

use Drupal\Core\Template\Attribute;

require_once 'autoload.php';

function providerTestAttributeData() {
  return [
    ['&"\'<>' => 'value'],
    ['title' => '&"\'<>'],
    ['class' => ['first', 'last']],
    ['disabled' => TRUE],
    ['disabled' => FALSE],
    ['alt' => ''],
    ['alt' => NULL],
    [
      'id' => 'id-test',
      'class' => ['first', 'last'],
      'alt' => 'Alternate',
    ],
    [],
  ];
}

$startTime = microtime(true);
// Your content to test
$attributesData = providerTestAttributeData();
for ($i=0; $i < 10000; $i++) {
  foreach ($attributesData as  $attributes) {
    // Convert array to attribute object.
    $attribute = new Attribute($attributes);
    // Change Attribute.
    $attribute->addClass(array('orange', 'blue'));
    $attribute->removeAttribute('id');
    // Cast to string.
    $value = (string) $attribute;
  }
}
$endTime = microtime(true);
$elapsed = $endTime - $startTime;

echo "Execution time : $elapsed seconds";

Convert AJAX part of \Drupal\field_ui\Tests\ManageDisplayTest to JavascriptTestBase

$
0
0

Problem/Motivation

drupalPostAjaxForm() is simulating the behaviour of ajax.js, so using it, doesn't really provide fundamental guarantees.
#2809161: Convert Javascript/AJAX testing to use JavascriptTestBase suggests to convert them to JavascriptTestBase

Proposed resolution

  1. Figure out which part of the test is testing PHP code and which part ajax behaviour
  2. Extract the ajax behaviour into a test that extends JavascriptTestBase

Remaining tasks

  1. Fix all the TODO tags in the test.

User interface changes

API changes

Data model changes

=

There is no indication on configuration forms if there are overridden values

$
0
0

Problem/Motivation

As per reviews by @webchick and discussion between @alexpott, @xjm and @effulgentsia, it may be a problem that configuration forms work totally opposite in terms of overridden values compared to how they worked in Drupal 7 and before. In Drupal 7 if you had a settings.php configuration override for example, that got used to build the configuration form and whatever you changed, the change did not stick. That was a WTF, but at least it was some sort of feedback on the value not being possible to change. In Drupal 8 however, overrides are not used to build forms and you can actually change settings and they would actually be saved and then displayed again on the form as if they were persisted. They are actually persisted but overrides may still apply on them, so the operation may be moot.

Proposed resolution

Following #2392319: Config objects (but not config entities) should by default be immutable each configuration form knows about the configuration keys edited and centralizes an accessor ($this->config()) to access them. Thanks to this, we can track if there were any configuration details loaded that may have overrides applied (by loading the editable version as well and comparing the data). That way, we can detect if there are overridden values at least under the same conditions as the admin form was displayed (eg. static global overrides). Using that information, we can display a message on top of the form if there is overridden configuration and editing is pointless.

Remaining tasks

Implement. Add tests. Review. Commit.

User interface changes

Configuration forms may display a message on the top if there are overridden values.

API changes

None.


Illegal string offset 'value' in Drupal\views\Plugin\views\area\Text

$
0
0

We are trying to determinate the causes of this issue.

In case you need an urgent fix. See #29

Hi,
I upgraded four different sites to Drupal 8.6. They all are Thunder installs. Then I updated them to Thunder 2.24 and on all sites I'm getting the following error:

  Warning: Illegal string offset 'value' in Drupal\views\Plugin\views\area\Text->preQuery() (Zeile 50 in .../core/modules/views/src/Plugin/views/area/Text.php)
  #0 .../core/includes/bootstrap.inc(584): _drupal_error_handler_real(2, 'Illegal string ...', '/home/www/doc/3...', 50, Array)
  #1 .../core/modules/views/src/Plugin/views/area/Text.php(50): _drupal_error_handler(2, 'Illegal string ...', '/home/www/doc/3...', 50, Array)
  #2 .../core/modules/views/src/ViewExecutable.php(1011): Drupal\views\Plugin\views\area\Text->preQuery()
  #3 .../core/modules/views/src/ViewExecutable.php(1233): Drupal\views\ViewExecutable->_preQuery()
  #4 .../core/modules/views/src/Plugin/views/display/PathPluginBase.php(390): Drupal\views\ViewExecutable->build()
  #5 .../core/modules/views/src/Plugin/views/display/Page.php(180): Drupal\views\Plugin\views\display\PathPluginBase->execute()
  #6 .../core/modules/views/src/ViewExecutable.php(1630): Drupal\views\Plugin\views\display\Page->execute()
  #7 .../core/modules/views/src/Element/View.php(77): Drupal\views\ViewExecutable->executeDisplay('page', Array)
  #8 [internal function]: Drupal\views\Element\View::preRenderViewElement(Array)
  #9 .../core/lib/Drupal/Core/Render/Renderer.php(378): call_user_func(Array, Array)
  #10 .../core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false)
  #11 .../core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(226): Drupal\Core\Render\Renderer->render(Array, false)
  #12 .../core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
  #13 .../core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(227): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
  #14 .../core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(117): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
  #15 .../core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
  #16 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
  #17 .../core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
  #18 .../vendor/symfony/http-kernel/HttpKernel.php(156): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
  #19 .../vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
  #20 .../core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #21 .../core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #22 .../core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #23 .../core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #24 .../core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #25 .../core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #26 .../vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #27 .../core/lib/Drupal/Core/DrupalKernel.php(665): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #28 .../index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
  #29 {main}.

Unknown column 'block_content_field_data.reusable' after upgrading from 8.5.7 to 8.6.0

$
0
0

WSOD after upgrading from 8.5.7 to 8.6.0.

Here's php and nginx log:

php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "NOTICE: PHP message: Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'block_content_field_data.reusable' in 'where clause': SELECT base_table.revision_id AS revision_id, base_table.id AS id"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "FROM"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "{block_content} base_table"
nginx | 2018/09/07 12:08:59 [error] 24#24: *507 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'block_content_field_data.reusable' in 'where clause': SELECT base_table.revision_id AS revision_id, base_table.id AS id
nginx | FROM
nginx | {block_content} base_table
nginx | INNER JOIN {block_content_field_data} block_content_field_data ON block_content_field_data.id = base_table.id
nginx | WHERE (block_content_field_data.reusable IN (:db_condition_placeholder_0)) AND (block_content_field_data.default_langcode IN (:db_condition_placeholder_1)); Array
nginx | (
nginx |     [:db_condition_placeholder_0] => 1
nginx |     [:db_condition_placeholder_1] => 1
nginx | )
nginx | " at /var/www/html/web/core/lib/Drupal/Core/Database/Connection.php line 686" while reading response header from upstream, client: 172.18.0.6, server: drupal, request: "GET / HTTP/1.1", upstream: "fastcgi://172.18.0.4:9000", host: "EXAMPLE.COM"
nginx | 172.18.0.6 - - [07/Sep/2018:12:08:59 +0000] "GET / HTTP/1.1" 500 79 "-""Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "INNER JOIN {block_content_field_data} block_content_field_data ON block_content_field_data.id = base_table.id"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "WHERE (block_content_field_data.reusable IN (:db_condition_placeholder_0)) AND (block_content_field_data.default_langcode IN (:db_condition_placeholder_1)); Array"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "("
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "    [:db_condition_placeholder_0] => 1"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "    [:db_condition_placeholder_1] => 1"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: ")"
php | [07-Sep-2018 12:08:59] WARNING: [pool www] child 68 said into stderr: "" at /var/www/html/web/core/lib/Drupal/Core/Database/Connection.php line 686"
php | 172.18.0.7 -  07/Sep/2018:12:08:59 +0000 "GET /index.php" 500

Switching between editors on the format configuration causes errors upon save

$
0
0

Problem/Motivation

On a fresh installation when someone accidentally switches the text editor from CKEditor to None and then back to CKEditor an unexpected error occurs.

Drupal\Core\Entity\EntityStorageException: 'editor' entity with ID 'basic_html' already exists. in Drupal\Core\Entity\EntityStorageBase->doPreSave() (line 430 of /home/r0kr9/www/core/lib/Drupal/Core/Entity/EntityStorageBase.php).

Steps to reproduce:

  1. Install Drupal
  2. Head to admin/config/content/formats/manage/basic_html
  3. Switch Text Editor to None
  4. Switch Text Editor back to CKEditor
  5. Save configuration

Ckeditor error

Proposed resolution

Fix it

Remaining tasks

Do it

User interface changes

None

API changes

None

Data model changes

None

Update PHPUnit to 6.5

$
0
0

Problem/Motivation

Since Drupal 8.7 will require PHP 7, we can finally upgrade to PHPUnit 6.5 by default.

Proposed resolution

Do it :)

Remaining tasks

Review, etc.

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.

CacheableHttpException must pass a $headers argument to HttpException

$
0
0

Not sure if rest.module is the right component for this issue.

Regardless, \Drupal\Core\Http\Exception\CacheableHttpException extends Symfony\Component\HttpKernel\Exception\HttpException. The fourth argument to HttpException must be an array of headers. CacheableHttpException instead passes its $code argument as the fourth value. It should be the fifth.

Patch soon.

t() should be replaced with $this->t()

views link to content in wrong language

$
0
0

I have standard taxonomy views and some custom blocks.
after click "link to content" field or imagefield linked to content page redirect always to node in source language, not to translation in current language.
how can I fix this?
Rendering language is set to 'Content language of view row', but I check other options


Different backends for saving configuration

$
0
0

Problem/Motivation

There is currently a strong and clear division of what is content and what is configuration. But some configuration blends the line. Block placements or some webforms are often created on the production environment and make deployment of configuration difficult. Config Ignore provides some help for this, but it can be dangerous if not configured correctly because it makes the configuration deployment less reliable.
At the same time for distributions it is challenging to draw a line for the ownership of the configuration and what is ok to customize.

Proposed resolution

Allow individual configuration items to be backed by different storage solutions similar to menu links which can be content, traditional configuration or from plugins defined directly in modules. This way some of the webforms could be defined as content and distributions can "own" views etc.

Remaining tasks

Spec out how exactly this could work.
Create a patch, review etc.

User interface changes

tbd. probably some additional buttons or screens.

API changes

new way of defining or config. The API to interact with the config should not need to be changed at all.

Data model changes

na

Custom blocks are no longer displayed and no longer appear in the custom block library

$
0
0

Hello,
After updating the core from 8.5.6 to 8.6.0, the custom block library appears empty. Custom block types still exist, but the custom block list is empty. Yet, they still exist in the database.

On the Block Layout page, custom blocks are listed in their place in the regions, but they do not appear with the message :

This block is defective or missing. The content is missing or you may need to activate the original module

.The TypedConfigManager.php file is identical to https://cgit.drupalcode.org/drupal/tree/core/lib/Drupal/Core/Config/Type... and I restarted the server without success.

The update operations for the blocks ran successfully :
block_content 8600 hook_update_n Add 'reusable' field to 'block_content' entities.
block_content add_views post-update Adds a 'reusable' filter to _reusable Custom Block views. _filter

The drush command php with

$ service=\Drupal :: service ('config.typed');
get_class ($ service);

return :

=> Drupal\Core\Config\TypedConfigManager {# 917
     + "_ serviceId": "config.typed",
   }

And after a press on entry :

=> "Drupal\Core\Config\TypedConfigManager"

Commenting out the line $context->setTypedDataManager($old_context->getTypedDataManager());in the core/lib/Drupal/Core/Plugin/Context/Context::createFromContext() file does not solve the problem.

Thank you for considering this case

Comments are not filtered on language

$
0
0

Problem/Motivation

The situation, I have a Drupal 8 multilingual node where Dutch is the main language and French is the other.
If I add a comment to the Dutch node translation and approve it, it will show. But it will also show in the French translation.
I think it is rather weird to see a mix of Dutch and French below a Dutch node.

P.S. as a quick workaround I created a view which shows me the comments based on the current node and filtered on a language. But it would be better that this approach is not necessary.

Proposed resolution

Add an option to select the language for show the comments.

Remaining tasks

Add test coverage.

User interface changes

A new option is added in the 'Manage display' tab for the comment which allow to config the language filter to show the comments.

API changes

The language_manager service is now injected to the CommentStorage class.

Data model changes

A new configuration named language_filter is now available to store the language configuration for display the comments.

Menu link targeting the current page is not accessible

$
0
0

Problem/Motivation

Given this menu link:

menu_test.current:
  title: 'Link to current page'
  route_name: '<current>'
  menu_name: account

An anonymous will not see it in the "account" menu. This is because the access to the route is denied. But if a user reached a page is supposed to be able to reach it again. So, the access to the <current> route should always be granted.

The bug is proved by the attached patch.

Proposed resolution

Always allow the access to <current> route.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Enclosure support for Aggregator

$
0
0

The aggregator should be able to parse the enclosure information out of RSS 2.0 feeds. It should be implemented to recognize and display the links to enclosures. If you want to 1 up the competition add the code to determine standard file types mp3, wma, ogg, etc and place a download Icon within the aggregated content.

I have donated and would be willing to help out more to see something like this implemented.

Viewing all 293485 articles
Browse latest View live


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