Bug #86909

tt_content examples in "Page" module does not respect CTypes added via TSconfig

Added by Soren Malling 7 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2018-11-11
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
autosite, sites
Complexity:
Is Regression:
Sprint Focus:

Description

Case

I've added a number of items to the tt_content field CType directly via Page TSconfig.

When I add a content element which is added via TSconfig, the backend print "INVALID VALUE (webability_[contentname])". This is due to the $CType_labels property being used for rendering is not taking what is added via TSconfig in to concern.

Proposed solution

I suggest that we streamline this access of content types, so changes made via tsconfig or any other condition is taken into account and returns a single point of getting these values.

Perhaps a more API-wise solution. A "Content Element Registry" of a kind.

Comments are welcome, I will love to put time into it.

This is finding and suggestion based on the work of EXT:autosite where TSconfig is playing a big part in keeping each pagetree/site clean.

Screen Shot 2018-11-13 at 12.54.28.png View (31.4 KB) Soren Malling, 2018-11-13 12:57

Screen Shot 2018-11-13 at 12.54.18.png View (19.4 KB) Soren Malling, 2018-11-13 12:57

Screen Shot 2018-11-13 at 12.54.46.png View (18.3 KB) Soren Malling, 2018-11-13 12:58

Associated revisions

Revision 4e239bc9 (diff)
Added by Georg Ringer 7 months ago

[BUGFIX] Check Tsconfig in page module for value of content element

In case a content element is added with TsConfig its label can't be
loaded from TCA but the TsConfig must be checked.

Resolves: #86909
Releases: master, 8.7
Change-Id: I2de2b73dcd4799a45aece330f377e86bd2bf596f
Reviewed-on: https://review.typo3.org/58889
Reviewed-by: Soren Malling <>
Tested-by: Soren Malling <>
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

Revision 9ff37c43 (diff)
Added by Georg Ringer 7 months ago

[BUGFIX] Check Tsconfig in page module for value of content element

In case a content element is added with TsConfig its label can't be
loaded from TCA but the TsConfig must be checked.

Resolves: #86909
Releases: master, 8.7
Change-Id: I2de2b73dcd4799a45aece330f377e86bd2bf596f
Reviewed-on: https://review.typo3.org/58892
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Soren Malling 7 months ago

  • Tags set to autosite

#2 Updated by Soren Malling 7 months ago

  • Tags changed from autosite to autosite, sites

#3 Updated by Georg Ringer 7 months ago

  • Status changed from New to Needs Feedback

Hey!

thanks for creating this issue. however I can't really reproduce that: Using the tsconfig

TCEFORM.tt_content.CType.addItems.what = whatever

will create a new content element type in the select form with no new fields but everything looks fine. yes a easier way to create content elements would be great but that is a different thing

#4 Updated by Soren Malling 7 months ago

Hey!

thanks for creating this issue. however I can't really reproduce that: Using the tsconfig
[...]

will create a new content element type in the select form with no new fields but everything looks fine. yes a easier way to create content elements would be great but that is a different thing

I create the tt_content CType element via tsconfig using similar code

TCEFORM {
    tt_content {
        CType {
            addItems {
                webability_jumbotron = Jumbotron
                webability_leadform = Leadform (Bliv ringet op)
                webability_uniquesellingpoints = USP blok
            }
        }
    }
}

And it gives me (as expected) the element when editing content.

See file: Screen Shot 2018-11-13 at 12.54.28.png

But after inserting a content element of one of the types added via TSconfig the "Preview" in the Page module shows this "INLVAID VALUE [CTYPE VALUE]"

See file: Screen_Shot_2018-11-13_at_12.54.18.png

This is due to the property `CType_labels` inside `TYPO3\CMS\Backend\View\PageLayoutView` is being filled from the TCA definition (line 878) where the TSconfig added values are not present

#5 Updated by Gerrit Code Review 7 months ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58889

#6 Updated by Gerrit Code Review 7 months ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58892

#7 Updated by Georg Ringer 7 months ago

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

#8 Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF