Bug #47359
closed
TCA setting subtypes_excludelist has problems with inline elements
Added by Alexander Stehlik over 11 years ago.
Updated about 7 years ago.
Category:
FormEngine aka TCEforms
Sprint Focus:
Remote Sprint
Description
The problem seems to be the class variable excludeElements
in TYPO3\CMS\Backend\Form\FormEngine
.
When a palette has an inline record, the function stack looks like:
TYPO3\CMS\Backend\Controller\EditDocumentController->makeEditForm( )
TYPO3\CMS\Backend\Form\FormEngine->getMainFields( )
TYPO3\CMS\Backend\Form\FormEngine->getPaletteFields( )
TYPO3\CMS\Backend\Form\FormEngine->loadPaletteElements( )
TYPO3\CMS\Backend\Form\FormEngine->getSingleField( )
TYPO3\CMS\Backend\Form\FormEngine->getSingleField_SW( )
TYPO3\CMS\Backend\Form\Element\InlineElement->getSingleField_typeInline( )
TYPO3\CMS\Backend\Form\Element\InlineElement->renderForeignRecord( )
TYPO3\CMS\Backend\Form\Element\InlineElement->renderMainFields( )
TYPO3\CMS\Backend\Form\FormEngine->getMainFields( )
TYPO3\CMS\Backend\Form\FormEngine->getPaletteFields( )
TYPO3\CMS\Backend\Form\FormEngine->loadPaletteElements( )
TYPO3\CMS\Backend\Form\FormEngine->getExcludeElements( )
When the InlineElement
class calls getMainFields
the excludeElements
class variable seem to get overwritten in loadPaletteElements()
.
I see two possible solutions:
- Simple: Use local variables
- Implement a cache based on the current table / field
Please let me know which solution you prefer and I will provide a patch.
Files
- Status changed from New to Under Review
can you also please describe the problem with more than "as problems with inline elements".. how can I test it?
I attached a test extension where you can see the problem.
Please install it and create a new Subtype test record
.
There you have field called Subtype switch
. When you choose Excluded fields
both fields (Before inline
and After inline
) are hidden correctly.
Now add a new item for Children
and save the record. The field After inline
appears.
Apply the patch and the field disappears again.
This only works, when you use a palette in the parent record (tx_inlinetest_record
). When you put the fields inside the types
configuration, everything works fine, no matter if the patch was applied or not.
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/20026
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/20026
- Target version set to 7.1 (Cleanup)
- Is Regression set to No
- Sprint Focus set to Remote Sprint
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/20026
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40272
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/20026
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40272
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF