Problem/Motivation

TypeError: Argument 1 passed to Drupal\date_recur\Plugin\DateRecurOccurrenceHandler\DefaultDateRecurOccurrenceHandler::getOccurrenceCacheStorageTableName() must implement interface Drupal\Core\Field\FieldDefinitionInterface, instance of Drupal\field\Entity\FieldStorageConfig given, called in modules/contrib/date_recur/src/Plugin/DateRecurOccurrenceHandler/DefaultDateRecurOccurrenceHandler.php on line 106 in modules/contrib/date_recur/src/Plugin/DateRecurOccurrenceHandler/DefaultDateRecurOccurrenceHandler.php on line 229 #0 web/modules/contrib/date_recur/src/Plugin/DateRecurOccurrenceHandler/DefaultDateRecurOccurrenceHandler.php(106): Drupal\date_recur\Plugin\DateRecurOccurrenceHandler\DefaultDateRecurOccurrenceHandler::getOccurrenceCacheStorageTableName(Object(Drupal\field\Entity\FieldStorageConfig))

Proposed resolution

Get the storage definition instead of the field in all calls to getOccurrenceCacheStorageTableName()

CommentFileSizeAuthor
#2 2990639-2.patch3 KBjoelpittet

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

StatusFileSize
new3 KB

Here's the patch

joelpittet’s picture

Priority: Normal » Major

Prevents delete so bumping to major.

  • dpi committed 847c541 on 8.x-1.x authored by joelpittet
    Issue #2990639 by joelpittet, dpi: Delete is using the wrong interface...
dpi’s picture

Status: Needs review » Fixed

Thanks, committed with minor additions.

Changes were already on 8.x-2.x

joelpittet’s picture

Thanks! maybe I should be on the 2.x branch, didn't realize there was a new branch in the composer workflow(still getting used to it).

joelpittet’s picture

May I ask why the other occurrences I replaced didn't need the same treatment?

Edit: Just found the answer, the variable is the same name but the value is different... it's the field storage definition... Maybe I could propose a variable name change for consistency?

Status: Fixed » Closed (fixed)

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