Closed the-robman closed 3 years ago
I am interested, too... got the same issue
Thanks for the fast reply. I tested the bugfix from here. The second dataProcessing result (dataProcessing.221.dataProcessing.20) for the image(s) also disappeared now.
Environment: DDEV 1.16.7, TYPO3 10.4.14, PHP 7.4.3 Happy easter days for you!
@the-robman Thanks for testing and reporting. Do the first dataProcessing for the child now work for you? can you test this commit? https://github.com/b13/container/commit/40ae5f9d6d0978d584ef72e7a4c8186cfc9b56a2
Hi Achim, everything works fine now. The dataProcessor for the parent flexform and flexform + image(s) from child(s). Thanks for help and fixing the problem!
must be merged
I found another problem today. If I have a accordion with child elements inside and put the accordion inside a 2-cols container, the dataProcess for the "grandParentFromChild" is empty. Here's a code example:
tt_content.container_accordion < lib.contentElement
tt_content.container_accordion {
dataProcessing.211 = B13\Container\DataProcessing\ContainerProcessor
dataProcessing.211 {
colPos = 211
as = accordion
// flexform still work
dataProcessing.10 = My\Custom\DataProcessing\FlexFormProcessor
// get files from childs too
dataProcessing.20 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
// get data from parent (accordion): OK
dataProcessing.30 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
dataProcessing.30 {
if.isTrue.field = tx_container_parent
table = tt_content
where = tt_content.CType='container_accordion'
uidInList.field = tx_container_parent
as = dataFromParent
// get data from parent (2-cols container) of parent (accordion):
// is empty
dataProcessing.40 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
dataProcessing.40 {
if.isTrue.field = tx_container_parent
table = tt_content
where = tt_content.CType='container_accordion_in_2columns'
uidInList.field = tx_container_parent
as = grandParentFromChild
}
}
}
}
@the-robman hm, for me this looks not like a bug of the container dataProcessor, whatever, can you please raise a new issue for this, and provide your Container Configs
Please forget the last comment :-) A better solution comes with fluid foreach, if (parent), then queries. To much dataProcessor nesting makes the logic unnecessary complicated.
The problem must be in the flexform data processor. We have my own and the following config works fine for me:
DownloadList = < lib.contentElement
DownloadList {
templateName = DownloadList
dataProcessing {
10 = Snowflake\Template\DataProcessing\FlexformDataProcessor
10 {
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references.fieldName = files1
as = files1
}
20 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
20 {
references.fieldName = files2
as = files2
}
30 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
30 {
references.fieldName = files3
as = files3
}
}
}
}
}
I have all three working:
@dmitryd you are right, but the flexform data processor above works for "normal" Content-Elements as DataProcessor, i think it should also work for Container Content-Elements
@achimfritz I have it for containers too (it adds flexform fields) but I did not try with nested. I do not see why it should not work though because subprocessors will be called from my processor. Here is the TS:
AccordeonContainer = < lib.contentElement
AccordeonContainer {
templateName = AccordeonContainer
dataProcessing {
10 = B13\Container\DataProcessing\ContainerProcessor
20 = Snowflake\Template\DataProcessing\FlexformDataProcessor
}
}
There I got the full data record and add flexform fields. My procesor does not care if it is called on container or not.
i have thiink about it, and my result for the FlexFormProcessor is:
do not access the pi_flexform
from $processedData['data'][$fieldName]
but access the field from $cObj->data[$fieldName]
https://github.com/benjaminkott/bootstrap_package/blob/master/Classes/DataProcessing/FlexFormProcessor.php#L63 https://github.com/benjaminkott/bootstrap_package/blob/master/Classes/DataProcessing/FlexFormProcessor.php#L68
Hello guys,
your container extension is awesom! That makes the content elements creating much easier.
I tryed to get the flexform config from a child element inside a container, with this:
The "My\Custom\DataProcessing\FlexFormProcessor" is this one. The first flexform dataprocessing for the parent container works, the second inside not.
Have you any idea, why the second dataprocess quit his work? Thank you for this great extension!
Greetings Robert