[TYPO3] dynaflex produces wrong flexform-format
Johannes Konert
johanneskonert at gmx.de
Sun May 21 18:02:27 CEST 2006
Hello again,
unfortunatelly my answer was a little bit too early.
The simple example without more than one field in the 'field_config'
array works fine (is inserted correctly into existing
TCA-flexform-structure.
So this works:
...'modifications' => array (
array (
'method' => 'add',
'path' => 'sheets/sDEF/ROOT/el',
'type' => 'field',
'field_config' => array (
'name' => 'testtitle1',
'label' => 'testtitle',
'config' => array (
'type' => 'input',
'size' => '10',
'max' => '20',
'eval' => 'trim'
), ...
But
inserting more than one field by using the 0=>, 1=> substructure like this:
'modifications' => array (
array (
'method' => 'add',
'path' => 'sheets/sDEF/ROOT/el',
'type' => 'field',
'field_config' => array (
0 => array (
'name' => 'testtitle1',
'label' => 'testtitle',
'config' => array (
...
),
),
1 => array (
'name' => 'desc1',
'label' => 'description',
'config' => array (
...
does produce a part of the TCA (at the end) looking like this:
< type="array">
<TCEforms type="array">
<label type="NULL"></label>
<config type="NULL"></config>
</TCEforms>
</>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
AS you can see, the field names and labels are missing the moment we use
a sub_array in field_config.
Might be an easy fix. I hope it is not simply my fault and a kind of
misconfiguration, but removing the 0=> and 1=> and using only one field
works; back to a structure with 2 fields I get the error.
By the way:
I have a ds_type-selector as well to switch between several flexforms
depending on type selected for plugin. TYPO3 is reloading the page
correctly, but Dynaflex seems not to be included in processing. So after
switching the type of the plugin back and forth the dynaflex extension
of the flexform is gone...can that be fixed by using dynaflex via the
hook like in your tutorial or is it an unsolveable problem?
Thanks again for all your time and help (Thomas and others).
Regards
Johannes :)
Johannes Konert wrote:
> Hello Thomas,
> thanks a lot for the new release. It works now as it should. I'll try it
> out the next weeks :)
> Cheers
> Johannes
>
> Thomas Hempel wrote:
>> Hello,
>>
>> I had a look at DynaFlex yesterday and I have to say that I found some
>> bugs in it. Due to some changes I made for commerce, the most simple
>> things doesn't work anymore. :-/
>>
>> To my blame I have to say that I obvisiously didn't tested this
>> features. :-( I'm sorry for that!!!
>>
>> Anyway, I fixed the bugs and wrote a tutorial extension that shows
>> some basic modifications. The current dev version (0.9.10) is not in
>> the repository yet because the manual has to be rewritten.
>>
>> But you can download the most recent version of dynaflex and
>> dynaflex_tut on my website:
>> http://www.typo3-unleashed.net/singleentry.html?&tx_ttnews[tt_news]=453&tx_ttnews[backPid]=24&cHash=c489f19678
>>
>>
>> WARNING! The DynaFlex Tutorial Extension only works with TYPO3 4.0 in
>> this version because I call it with the hook that came in beta2 of
>> 4.0. If you call it somewhere else, DynaFlex will work with older
>> TYPO3 versions of course.
>>
>>
>> Greets,
>> Thomas
>>
>>
More information about the TYPO3-english
mailing list