Open ironeddie opened 4 years ago
it's intented because we need to know which key in data from dataProcessors we should display, I would like to set some default fallback, but current implementation of dataProcessors is inconsistent, as there is no standardization in terms of default "as" value along dataProcessors, so we need to set "as" in dataProcessor. On upcoming codesprint I would like to take care of this issue.
as i changed line 211 in JsonContentObject.php
from
return $dataProcessingData;
to
return (empty($dataProcessingData) ? $data : $dataProcessingData);
all my data is now rendered properly in the returning result from request. Maybe this is already a workaround and a possible solution for this issue...
please let me know if you think this may lead to unpredictable behaviour on other side. thank you.
Hi,
I guess, your solution renders all data that comes from dataProcessor if you don't specify 'as'?
It's ok, as if you don't set 'as' then you have whole output. Could you provide PR with this change?
@gordon81 taking the issue
Hi guys, i am struggling with dataProcessors in custom content elements and headless… assuming a content element dataProcessing like following:
and finding in extension code
FriendsOfTYPO3\Headless\ContentObject\JsonContentObject
on line 205-210 the code is searching for a “as” definition in conf, otherwise it will return an empty array… this is perhaps not the right behaviour as the data processor for the content element itself will fill the data array to my proper needs. is this a bug? (bearbeitet)