Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Code - misc
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2013 at 12:17 UTC
Updated:
7 Oct 2016 at 08:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joachim commentedComment #2
claudiu.cristeaYes, it's so weird that the properties content its actually prepared in theme layer. Shouldn't take place in the 'build' phase
hook_entity_view()orEntityAPIControllerInterface::buildContent()? And then the theme engine should receive the already built content that it can alter in process/pre-process phase.Comment #3
claudiu.cristeaComment #4
claudiu.cristeaWorks nice for me. RTBC but still think that the property values must be prepared in the 'buildContent' phase. I opened a ticket for that in #2361465: Property values to be built in the 'build' phase (not in theme).
Comment #6
fagoThanks - committed. I agree with #4 - but that seems to be a worthwhile fix meanwhile anyways.
Comment #8
jelle_sFYI: This commit is not backwards compatible, this broke something on a production site of ours.
We had a preprocess function that ran before
template_preprocess_entity_propertyand themed dates as formatted dates (instead of a timestamp) and stored it in$variables['content']. Took me a while before I found what was wrong. Now the preprocess function stores it in$element['#content']. I hope this helps others who might experience the same problem.