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

Michael Stucki michael at typo3.org
Tue Jun 23 14:37:14 CEST 2009


* 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
> 


-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list