Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swentel’s picture

Issue tags: +Field API

Tagging

swentel’s picture

FileSize
10.05 KB

Initial patch, can't get it to save stuff though.

swentel’s picture

Note that default_token_formatter should go from the patch.

linclark’s picture

I think dates not saving could be an underlying problem. I've been running into the issue in a serialization patch.

These two lines of code should be the same (they are in the case of text fields), but they aren't behaving the same:

$entity->get($field_name)->offsetGet(0)->setValue(array('value' =>$iso_date));
$entity->get($field_name)->offsetGet(0)->get('value')->setValue($iso_date);

I had created #2019587: Add test coverage for DateTimeItem to add tests for that issue.

swentel’s picture

Status: Postponed » Active
amateescu’s picture

Status: Active » Needs review
FileSize
9.34 KB

Recreated the patch :)

Status: Needs review » Needs work

The last submitted patch, 2017139-6.patch, failed testing.

amateescu’s picture

Status: Needs work » Needs review
FileSize
1.54 KB
9.32 KB

And this one should work.

yched’s picture

This looks good, but I'd rather let #2051177: Make existing ConfigFieldItem subclasses usable by base fields get in first :-)

amateescu’s picture

FileSize
2.03 KB
9.26 KB

That one just got in, here's an updated patch.

yched’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Thanks !

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 362e5f8 and pushed to 8.x. Thanks!

xjm’s picture

Title: Convert field type to typed data plugin for datetime module » [Change notice] Convert field type to typed data plugin for datetime module
Priority: Normal » Critical
Status: Fixed » Active
Issue tags: +API change, +Needs change record, +Approved API change

Several API changes here that it took me a git bisect to find :)

xjm’s picture

Title: [Change notice] Convert field type to typed data plugin for datetime module » Convert field type to typed data plugin for datetime module
Priority: Critical » Normal
Status: Active » Fixed
Issue tags: -API change, -Needs change record, -Approved API change

Never mind; these are just hook implementations. Sorry @beejeebus. :)

Status: Fixed » Closed (fixed)
Issue tags: +API change, +Needs change record, +Approved API change

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

xjm’s picture

Issue tags: -Needs change record

Darn you d.o.