Project

General

Profile

Actions

Bug #86909

closed

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

Added by Soren Malling over 5 years ago. Updated almost 5 years ago.

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

100%

Estimated time:
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.


Files

Actions #1

Updated by Soren Malling over 5 years ago

  • Tags set to autosite
Actions #2

Updated by Soren Malling over 5 years ago

  • Tags changed from autosite to autosite, sites
Actions #3

Updated by Georg Ringer over 5 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 over 5 years 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

Actions #5

Updated by Gerrit Code Review over 5 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

Actions #6

Updated by Gerrit Code Review over 5 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

Actions #7

Updated by Georg Ringer over 5 years ago

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

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF