Problem/Motivation

Some entity queries fail because the default implementation of FieldItemInterface::mainPropertyName() returns "value", while the storage for DurationField does not contain a field ending with "_value".

Steps to reproduce

This was illustrated by using the Site Audit module, which fails on invalid SQL queries for fields using Duration Field.

Proposed resolution

Implement FieldItemInterface::mainPropertyName() and return "duration"

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3189598-2.patch550 bytesrlmumford
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mikegodin created an issue. See original summary.

rlmumford’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new550 bytes

I also came across this issue, the fix in the proposed resolution branch resolves the issue. Converting to a patch to add to my composer.json

  • 77c2b11 committed on 3.0.x
    Issue #3189598 by mikegodin, rlmumford: FieldItem definition is missing...

  • 4b37f20 committed on 8.x-2.x
    Issue #3189598 by mikegodin, rlmumford: FieldItem definition is missing...
jaypan’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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