I can see possible code bug inside TermStorageSchema class:

protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
    $schema = parent::getEntitySchema($entity_type, $reset = FALSE);

The $reset parameter is always set to FALSE - I can't see any reason for doing this - is it by purpose or just a copy/paste bug?

I can't find similar approach anywhere else - e.g. UserStorageSchema or NodeStorageSchema are passing variable correctly:

protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
    $schema = parent::getEntitySchema($entity_type, $reset);

Comments

kyberman created an issue. See original summary.

kyberman’s picture

Status: Active » Needs review
StatusFileSize
new705 bytes

Here is the patch.

borisson_’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

This is a bug, but as this passed tests before, it looks like we don't have enough test-coverage.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andypost’s picture

Not clear how to test this protected method but surely it is typo

andypost’s picture

andypost’s picture

amateescu’s picture

Title: Fix reset parameter inside getEntitySchema parent call » Fix $reset parameter inside TermStorageSchema::getEntitySchema() parent call
Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs tests

I think this would be quite hard to test, and not really worth it for an obvious copy-paste mistake.

andypost’s picture

StatusFileSize
new696 bytes

reroll

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 6b623b4e08 to 8.7.x and c03db884ca to 8.6.x. Thanks!

  • alexpott committed 6b623b4 on 8.7.x
    Issue #2919332 by andypost, kyberman, borisson_, amateescu: Fix $reset...

  • alexpott committed c03db88 on 8.6.x
    Issue #2919332 by andypost, kyberman, borisson_, amateescu: Fix $reset...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.