Bug #86909
closedtt_content examples in "Page" module does not respect CTypes added via TSconfig
100%
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.
Files
Updated by Soren Malling about 6 years ago
- Tags changed from autosite to autosite, sites
Updated by Georg Ringer about 6 years 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
Updated by Soren Malling about 6 years ago
- File Screen Shot 2018-11-13 at 12.54.28.png Screen Shot 2018-11-13 at 12.54.28.png added
- File Screen Shot 2018-11-13 at 12.54.18.png Screen Shot 2018-11-13 at 12.54.18.png added
- File Screen Shot 2018-11-13 at 12.54.46.png Screen Shot 2018-11-13 at 12.54.46.png added
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
Updated by Gerrit Code Review about 6 years 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
Updated by Gerrit Code Review about 6 years 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
Updated by Georg Ringer about 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4e239bc98008e51f4c8a5e7eb0a484bae2ab158c.