Quantcast
Viewing all articles
Browse latest Browse all 291671

EntityFormController::submit() returns an unrenderable $entity depending on hook_field_load() implementations

Spin-off from #501428-143: Date and time field type in core. If a module implements hook_field_load() to add something that later functions (e.g., formatters) expect to be there (for example, in the case of datetime.module, it adds a $item['date'] object derived from the $item['value'] string), then EntityFormController::submit() overrides the field items with their new values, and destroys the stuff added by hook_field_load(), breaking those other functions unless the entity is saved and reloaded.

Not sure how to solve this yet. EntityNG supports a better way of implementing calculated fields, and that could be part of the answer.


Viewing all articles
Browse latest Browse all 291671

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>