Bug #47359
closedTCA setting subtypes_excludelist has problems with inline elements
100%
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
Updated by Gerrit Code Review over 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20026
Updated by Georg Ringer over 11 years ago
can you also please describe the problem with more than "as problems with inline elements".. how can I test it?
Updated by Alexander Stehlik over 11 years ago
- File inlinetest.zip inlinetest.zip added
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.
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20026
Updated by Gerrit Code Review about 11 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/20026
Updated by Gerrit Code Review about 10 years ago
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
Updated by Gerrit Code Review about 10 years ago
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
Updated by Frans Saris almost 10 years ago
- Target version set to 7.1 (Cleanup)
- Is Regression set to No
- Sprint Focus set to Remote Sprint
Updated by Gerrit Code Review over 9 years ago
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
Updated by Benni Mack over 9 years ago
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Updated by Gerrit Code Review over 9 years ago
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
Updated by Gerrit Code Review over 9 years ago
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
Updated by Gerrit Code Review over 9 years ago
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
Updated by Alexander Stehlik over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1584b3424316dd584bcba8012ffdcde8472c2b93.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed