Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2013-04-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
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:

  1. Simple: Use local variables
  2. Implement a cache based on the current table / field

Please let me know which solution you prefer and I will provide a patch.


Files

inlinetest.zip (2.67 KB) inlinetest.zip Extension for testing Alexander Stehlik, 2013-04-19 08:28
Actions #1

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

Actions #2

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?

Actions #3

Updated by Alexander Stehlik over 11 years ago

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.

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

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

Actions #8

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
Actions #9

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

Actions #10

Updated by Benni Mack over 9 years ago

  • Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Actions #11

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

Actions #12

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

Actions #13

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

Actions #14

Updated by Alexander Stehlik over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF