[TYPO3-core] RFC: Bug #9897: (Improved solution) Extending palettes and fields to be displayed in back-end forms mixes up tabs

Oliver Hader oliver at typo3.org
Mon Aug 31 18:17:16 CEST 2009


FYI: Committed the attached test cases as follow-up to SVN Trunk (rev. 5858)

This extended test cases bring up some misbehaviours that will be fixed
in separate RFCs.

olly


Michael Stucki schrieb:
> * Committed to Trunk (rev. 5622, 5623, 5624)
> 
> - michael
> 
> Michael Stucki schrieb:
>> This is a SVN patch request.
>>
>> This RFC is about a bug which is actually already fixed in Trunk.
>> However, I was using a backport of it which did not contain that
>> specific fix, so I spent quite some time to do the same like Olly
>> already did, but finally coming to a different solution.
>>
>> First, here is the problem again, quoted from Ollys RFC:
>>
>> | Problem:
>> | A misbehaviour in t3lib_extMgm results in missing tabs when TCA types
>> |  or palettes definitions get extended. Imagine the following initial
>> |  field list: "fieldA, --div--;General, fieldB, --div--;Access, fieldC"
>> |
>> | After extending this list via t3lib_extMgm calls, you'd get something
>> | like this - the second tab item is missing:
>> | "fieldA, --div--;General, fieldB, fieldC"
>>
>> Solution:
>> What Olly did in his fix was to store the items in an indexed array.
>> This works well but adds quite a lot of complexity to the code.
>>
>> The solution I was choosing was simply to make sure that the key is
>> unique. This is only needed for "--div--" and "--palette--" - every
>> other field must be unique, but these are allowed multiple times per
>> table.
>>
>> Finally, the div/palette fields are made unique by adding a counter to
>> the key name. Consequently that must be removed again when the value is
>> processed.
>>
>> The result of this may seem like a workaround, but what is much more
>> important to me, is that it is much easier to understand and maintain.
>> Ollys version is truely good, but requires quite some time in order to
>> understand the concept behind it
>>
>> My suggestion is to revert Ollys fix (check_4661.diff) and commit the
>> new solution (bug_9897_v2.diff).
>>
>> Additionally, Olly has also renamed some internal functions in order to
>> reflect that the list not only contains fields but also other items
>> (--div-- / --palette--). I agree about this change and propose to rename
>> the functions again after the fix has been committed. The proposal for
>> it is attached as bug_9897_postRename.diff.
>>
>> Comments:
>> I already discussed the fix with Olly and Ingo (who suggested nearly the
>> same solution some time ago in a duplicate bug of #9897), and they both
>> agree to the proposal.
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=9897
>>
>> Branch: Trunk
>>
>> Greetings form Laax!
>> - michael
-- 
Oliver Hader
TYPO3 Release Manager 4.3


More information about the TYPO3-team-core mailing list