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

\Drupal\field\FieldStorageConfigStorage::mapFromStorageRecords() can fail without a reasonable error

$
0
0

Problem/Motivation

When $class in \Drupal\field\FieldStorageConfigStorage::mapFromStorageRecords() does not exist the system breaks with a hard to decipher error.

Proposed resolution

Improve what happens here. And probably improve \Drupal\field\FieldStorageConfigStorage::mapToStorageRecord too.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Original issue summary

I am suddenly getting an error on my Drupal 8 installation. Getting a WSOD and the following message in the logs

PHP Fatal error:  Class name must be a valid object or a string in /var/www/wildlife/core/modules/field/src/FieldStorageConfigStorage.php on line 155

Something along the way has gotten corrupted but I can't see how to fix it. ideas?


Warn users of PHP 5.5 and recommend PHP 7

$
0
0

Problem/Motivation

PHP 5.5 will be quite soon out of security support, see https://secure.php.net/supported-versions.php

Proposed resolution

Warn users of php 5.5, so we can remove support for it in a later release.

Remaining tasks

User interface changes

API changes

Data model changes

IGNORE patch testing issue

Incorrect order and duplicate theme hook suggestions

$
0
0

Just by turning on twig debug and looking at theme suggestions, you can see for the main menu (and any corresponding menu like footer) that there is a duplicate theme suggestion and at the most specific level which overrides any and all customizations in hook_theme_suggestions_alter().

<!-- THEME DEBUG --><!-- THEME HOOK: 'menu__main' --><!-- FILE NAME SUGGESTIONS:
   x menu--main.html.twig
   * menu--main--customization.html.twig
   x menu--main.html.twig
   * menu.html.twig
-->

Should be:

<!-- THEME DEBUG --><!-- THEME HOOK: 'menu__main' --><!-- FILE NAME SUGGESTIONS:
   x menu--main--customization.html.twig
   * menu--main.html.twig
   * menu.html.twig
-->

Remove delete link from Manage moderation settings page

$
0
0

Problem/Motivation

On for the "Manage moderation" page (for example /admin/structure/types/manage/article/moderation) there is a delete link, this link deletes the bundle. It shouldn't be there.

Proposed resolution

Remove the delete link

Remaining tasks

User interface changes

API changes

Data model changes

Improve installation language requirement descriptions and offline detection

$
0
0

Problem/Motivation

In #1887046: Convert drupal_http_request usage in install.core.inc to Guzzle. (#31) the language requirement error description caused confusion. A website which could not connect to the translation server, probably due to a firewall, reported to be offline.
Currently the code does not differentiate between offline and not able to connect the translation server. Once the guzzle http library is being used for http requests (the mentioned issue) this becomes possible.

Proposed resolution

* Separately detect and report online/offline.
* Separately detect and report whether the translation server can be connected.

Test this patch in the following situations:

  • Drupal 8 located on a server behind a firewall which blocks HTTP access to ftp.drupal.org
  • Drupal 8 located on a server behind a proxy server which blocks HTTP access to ftp.drupal.org
  • Drupal 8 located on a (localhost) server with no connection to internet
  • Drupal 8 located on a (localhost) server with an unreliable internet connection. E.g. 3G while traveling
  • Install with a non-existing language code in the url. E.g. core/install.php?langcode=xyz
  • And finally ;) Drupal 8 located on a (localhost) server a normal internet connection installing in a regular language.

Check if the failure situation is correctly detected. Check if the help text is clear and helpfull.

Remaining tasks

Contributor tasks needed
TaskNovice task?Contributor instructionsComplete?
Update the issue summaryInstructions
Update the issue summary noting if allowed during the betaInstructions

User interface changes

Changing language requirements report.

$build['#attributes'] added in hook_entity_view_alter() are not output for entity types that provide neither a #theme nor #theme_wrappers (breaks Quick Edit module for those entity types)

$
0
0

Updated: Comment #0

Problem/Motivation

Edit module adds needed attributes in edit_entity_view_alter() but default view builder does not provide a wrapper element to attach this attributes so JS throws and exception and other behaviors are not run.

Proposed resolution

Add default #theme_wrappers within edit module or default wrapper in EntityViewBuilder so contrib entities will not require to implement entity view builder to allow edit module work

Custom block views don't use the block template

$
0
0

Problem/Motivation

When I display a custom block using the block layout configuration the block prints using the block.html.twig template however if I have a custom block view each row is just the rendered fields, not the whole rendered block.
This causes problems for themers and is inconsistent with similar row formats like "Show: Content" for nodes.

This also means that contextual links don't show for blocks in a view.

Steps to reproduce:

  1. Create a custom block
  2. Create a view showing custom blocks
  3. For the view format select Show = Custom block

Proposed resolution

For this "Show: Content block" row type the row should be the rendered block, not just the fields.
If you want individual fields you would choose "Show: Fields" instead.


Views throws 'SQLSTATE[42S02]: Base table or view not found' due to malformed join on conditional filters that use a relationship

$
0
0

Dears,
I am trying to use contextual filters with relationships and have the error below (with the relationships):

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'movadomfpadrupal._taxonomy_term__field_domaine' doesn't exist: SELECT node_field_data.langcode AS node_field_data_langcode, node_field_data.title AS node_field_data_title, node_field_data.nid AS nid, taxonomy_term_field_data_node__field_population.tid AS taxonomy_term_field_data_node__field_population_tid FROM {node_field_data} node_field_data LEFT JOIN {node__field_population} node__field_population ON node_field_data.nid = node__field_population.entity_id AND (node__field_population.deleted = :views_join_condition_0 AND node__field_population.langcode = node_field_data.langcode) LEFT JOIN {taxonomy_term_field_data} taxonomy_term_field_data_node__field_population ON node__field_population.field_population_target_id = taxonomy_term_field_data_node__field_population.tid LEFT JOIN {taxonomy_term__field_domaine} taxonomy_term_field_data_node__field_population__taxonomy_term__field_domaine ON taxonomy_term_field_data_node__field_population.tid = taxonomy_term_field_data_node__field_population__taxonomy_term__field_domaine.entity_id AND (taxonomy_term_field_data_node__field_population__taxonomy_term__field_domaine.deleted = :views_join_condition_2 AND taxonomy_term_field_data_node__field_population__taxonomy_term__field_domaine.langcode = taxonomy_term_field_data_node__field_population.langcode) LEFT JOIN {} _taxonomy_term__field_domaine ON taxonomy_term_field_data_node__field_population__taxonomy_term__field_domaine.field_domaine_target_id = _taxonomy_term__field_domaine.id WHERE (( (node_field_data.status = :db_condition_placeholder_4) AND (node_field_data.type IN (:db_condition_placeholder_5)) )) ORDER BY node_field_data_title ASC; Array ( [:db_condition_placeholder_4] => 1 [:db_condition_placeholder_5] => service [:views_join_condition_0] => 0 [:views_join_condition_2] => 0 )

I have services contents associated with taxonomy terms (populations) using an entity reference field (field_population).
"Populations" taxomony are associated to domain entries (https://www.drupal.org/project/domain) using a reference field (field_domaine).

In my view (called "services" which displays services contents) when I add the relationship to the "Populations" taxonomy terms, everyhtning goes well.
When I add the relationship to the reference to a domain field, I go the error.
What am I doing wrong ?

View details is in attachment

Thanks for your help?

Views query parameters for sorting does not work

$
0
0

It seems that views query parameters through the URL does not result in them being passed on to the query.

I have narrowed it down to the difference between $view->exposed_data and $view->exposed_input. As far as i can tell from the code, exposed_input is the parameters fetched from either form submission or URL, and exposed_data is only as it is through form submission.

exposed_data is used a couple of places, where it does not make sense to only handle data through form submission.

Remove HTML from EntityResource validation 422 exception message

$
0
0

Problem/Motivation

Quoting @dawehner from #2813755-13: JSON responses encoded inconsistently: make them all RFC4627-compliant:

One question though I'd ask in general, shouldn't we strip of HTML out of those errors messages? For me those don't make sense, beside making it harder to read.

\Drupal\Component\Render\PlainTextOutput::renderFromHtml or a potential different implementation, could be used here.

Proposed resolution

Update \Drupal\rest\Plugin\rest\resource\EntityResource::validate().

Remaining tasks

TBD

User interface changes

None.

API changes

None.

Data model changes

None.

REST 403 responses don't tell the user *why* access is not granted: requires deep Drupal understanding to figure out

$
0
0

Problem/Motivation

#2772413: REST GET fails on entity/taxonomy_vocabulary/{id} 403 Forbidden with error uncovered that it can be very difficult even for a Drupal expert to figure out why you're getting a 403 for a particular REST resource.

Yet … we want Drupal to be adopted as the storage back-end by JavaScript developers — i.e. by non-Drupalists. How are they going to figure this out?

Proposed resolution

Our 403 responses for REST routes need to list a reason for this 403. And in fact, #2681911: REST requests without X-CSRF-Token header: unhelpful response significantly hinders DX, should receive a 401 response introduced that very infrastructure! We just need to use it more broadly now.

Remaining tasks

  1. Also let AccessResultNeutral implement \Drupal\Core\Access\AccessResultReasonInterface.
  2. Ensure it's done for all permission checking, and \Drupal\Core\Access\AccessResult::allowedIfHasPermission(s)() in particular.
  3. Test coverage.

User interface changes

None.

API changes

TBD

Data model changes

TBD

\Drupal\hal\Normalizer\ContentEntityNormalizer::denormalize() fails with fatal PHP error when bundles are missing from link relation types

$
0
0

Discovered while working on #2737719-114: EntityResource: Provide comprehensive test coverage: for every entity type, every format, every method.

The default entity (de)normalizer (\Drupal\serialization\Normalizer\EntityNormalizer::denormalize() gracefully handles the case of specifying an invalid bundle:

      // Make sure the submitted bundle is a valid bundle for the entity type.
      if ($bundle_types && !in_array($data[$bundle_key], $bundle_types)) {
        throw new UnexpectedValueException(sprintf('"%s" is not a valid bundle type for denormalization.', $data[$bundle_key]));
      }

This causes a 400 response with a helpful message.

OTOH, when using the HAL entity (de)normalizer (\Drupal\hal\Normalizer\ContentEntityNormalizer::denormalize), it fails spectacularly:

Exception: Notice: Undefined variable: type_uri
Drupal\hal\Normalizer\ContentEntityNormalizer->getTypedDataIds()() (Line: 250)

And I'm only able to see this error because I have verbose error output on. On a production site, the developer would receive a HTTP 500 response, and would hence be completely unable to figure out what's wrong. This is very bad for DX/RX.

Users do not understand "Lorem Ipsum" under Color Scheme preview

$
0
0

Currently in the Appearance section of Bartik, a live preview of a chosen color scheme is displayed as an image. This section uses Latin placeholder text, "Lorem ipsum . . . ." The problem is getting users to understand the Latin is JUST A PLACEHOLDER. Participants in a Drupal usability study at the University of Minnesota in 2011 expected it to be the live preview of the site with THEIR content. Looking at the Latin text, one participant in the study said, "What's this? French?"

In this thread from May 2011 to December 2014, contributors have narrowed in on recommending a patch to change the Latin text to repetitions of the English words "Sample text." Other suggestions have been to make the text translatable or to embed the content of the actual site as an iFrame. Placing "sample text" is the most simple of the solutions and would look like this:

Sample text

Block of text (re-arrange sentences so line lengths don't repeat)
This is a block of example content. This content is here to demonstrate what actual content would look like in the color scheme you configure. This is an example link, is is here to demonstrate how background colors you configure may affect the readability of links. This content is here to demonstrate what actual content would look like in the color scheme you configure. This is an example link, is is here to demonstrate how background colors you configure may affect the readability of links. This is a block of example content.

Fix spelling errors in Drupal core comments

$
0
0

Typos: statc, Contructs, optioanl, correclty, Snice, sttings, moncerus, file_save_htacess(), thre, perfoming, glueing, meothd, vlaue.

-    // internal statc caching of FileCache is used and thus avoids blowing up
+    // internal stat caching of FileCache is used and thus avoids blowing up

maybe not 'stat', but 'stat()' or 'status'?


Update to Twig 2.0.0

$
0
0

Problem/Motivation

Update to Twig 2.0 is released.
Twig 2 requires PHP 7.

Proposed resolution

Update it.
Create a abstraction layer for twig 1 and 2.
Revert changes to composer.lock and update twig to ~1.3

Remaining tasks

  • Make patch to change version string in core/composer.json to ^1.23.1|^2
  • Review
  • Commit

User interface changes

n/a

API changes

Should be none.

Data model changes

n/a

Use more specific entity.manager services in .services.yml files

$
0
0

Problem/Motivation

We have now things like the entity type manager. Let's use that one in our .services.yml files and use the right services in the classes itself.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

[PP-2] Changed time not updated when only non-translatable fields are changed on a translated entity

$
0
0

Problem/Motivation

Given an entity that has been translated (=== has more than 1 translation) that has an untranslatable field. When you change only that untranslatable field, ContentEntityBase::hasTranslationChanges() will return FALSE for all translations of that entity, even though in effect all translations have changed because untranslatable fields affect every language.

As ContentEntityBase::hasTranslationChanges() is used in two places in core, this has two different consequences:

Changed time tracking
Because forms explicitly update the changed timestamp whenever they are saved, this is only a problem when calling $entity->save() explicitly. In that case, though, because the changed timestamp is not updated, you can have sequential $entity->save() calls overwriting the other's data, which EntityChangedConstraintValidator would otherwise prevent
Tracking affected translations of a revision
This would lead to a new revision being marked as affecting no languages, so that it would not be visible at all in the user interface and, thus, not revertable. Because (as stated above), the changed time of the translation that is being edited is being explicitly changed (and because the changed field is translatable) this problem is somewhat masked, because this means that the translation that is being edited is always being marked as affected. Arguably, however, all translations should be marked as affected.

Proposed resolution

Remove the FieldDefinitionInterface::isTranslatable() check from ContentEntityBase::hasTranslationChanges().

Remaining tasks

  1. Write tests for the revision translation affected problem
  2. Review patch
  3. Write change notice

User interface changes

None.

API changes

This is a change in behavior, but as argued above the current behavior is a bug. The implications of this will have to be discussed in more detail.

Data model changes

None.

comment_update_8300 is not updating correctly the field storage definition of the status field

$
0
0

Problem/Motivation

This is a followup of #2810381: Add generic status field to ContentEntityBase where the status field is now introduced in CEB and there is an update function to update the field storage definition comment_update_8300 which however is retrieving the old cached definition and is passing it directly to EntityDefinitionUpdateManager::updateFieldStorageDefinition without making the needed changes on it.

Proposed resolution

Make the needed changes on the cached field storage definition before passing it to EntityDefinitionUpdateManager::updateFieldStorageDefinition.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

[regression] Menu links are no longer replaced by the path alias and translation prefix

$
0
0

I am running into a new bug that has appeared over the past week since I have upgraded from 8.1.10 to 8.2.1. I have a multilingual site and have created translations for most of my nodes. Prior to this bug, I was able to create menu items and add the link as either a node # (/node/1874) or by using the autocomplete to reference the node title. So long as the menu language is set correctly for each menu, the link will automatically include the path prefix and link to the node translation correctly with the appropriate path alias.

Since I have upgraded to 8.2.1, this behavior has changed. If my menu link is entered as a node #, the menu link will appear as node/id instead of the path alias. I have to enter the title name and use the autocomplete to reference the node in order for the menu link to include the path alias when rendered.

Viewing all 293832 articles
Browse latest View live