Bug #73209

Story #69617: FormEngine bugs

PAGE_TSCONFIG_ID not working anymore in TYPO3 9.5.x

Added by Raphael Zschorsch almost 4 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-02-10
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In TYPO3 7.6.1 when I set PAGE_TSCONFIG_ID like this:

TCEFORM {
  tt_content {
      pi_flexform {
        PAGE_TSCONFIG_ID = 2
      }
    }
  }
}

and try to use it in FlexForms like this:

<foreign_table_where>AND tx_myext_domain_model_table.pid = ###PAGE_TSCONFIG_ID###</foreign_table_where>

it doesn't work. No records are shown in the selectbox, but the exact same thing is working in TYPO3 6.2.x.


Related issues

Duplicated by TYPO3 Core - Bug #74510: PAGE_TSCONFIG_ID not working anymore in TYPO3 7.6.1 Closed 2016-02-10

Associated revisions

Revision e1882ba1 (diff)
Added by Christian Kuhn over 3 years ago

[BUGFIX] PAGE_TSCONFIG_ID in flex form fields

PAGE_TSCONFIG_ID, PAGE_TSCONFIG_IDLIST and PAGE_TSCONFIG_STR to
replace markers in foreign_table_where fields could only be set
for flex forms on a global level in the past:

TCEFORM.tt_content.pi_flexform.PAGE_TSCONFIG_ID = 42

This has the negative side effect that also fields from
potentially foreign plugins could have been affected by that.
With the FormEngine rewrite, this change only worked if restricted
to specific elements of a specific data structure:

TCEFORM.tt_content.pi_flexform.news.sDEF.settings\.categories.PAGE_TSCONFIG_ID = 42

The former "global" setting was broken and is fixed by the
patch with a hack. For master, this very hack is deprecated
now and only the specific version is allowed, for 7.6 both versions
work with the patch.

Note there is no setting for those foreign_table_where clauses
for section container elements anymore that is not deprecated.

Change-Id: I3f7bede86007f7ea1703f2bc569e0152e67802e6
Resolves: #73209
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/47924
Reviewed-by: Markus Klein <>
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>
Reviewed-by: Morton Jonuschat <>
Tested-by: Morton Jonuschat <>

Revision ae09f875 (diff)
Added by Christian Kuhn over 3 years ago

[BUGFIX] PAGE_TSCONFIG_ID in flex form fields

PAGE_TSCONFIG_ID, PAGE_TSCONFIG_IDLIST and PAGE_TSCONFIG_STR to
replace markers in foreign_table_where fields could only be set
for flex forms on a global level in the past:

TCEFORM.tt_content.pi_flexform.PAGE_TSCONFIG_ID = 42

This has the negative side effect that also fields from
potentially foreign plugins could have been affected by that.
With the FormEngine rewrite, this change only worked if restricted
to specific elements of a specific data structure:

TCEFORM.tt_content.pi_flexform.news.sDEF.settings\.categories.PAGE_TSCONFIG_ID = 42

The former "global" setting was broken and is fixed by the
patch with a hack. For master, this very hack is deprecated
now and only the specific version is allowed, for 7.6 both versions
work with the patch.

Note there is no setting for those foreign_table_where clauses
for section container elements anymore that is not deprecated.

Change-Id: I3f7bede86007f7ea1703f2bc569e0152e67802e6
Resolves: #73209
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/47943
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>
Reviewed-by: Morton Jonuschat <>
Tested-by: Morton Jonuschat <>

History

#1 Updated by Felix Nagel almost 4 years ago

Seems I'm having the same issue in 7.6.2

#2 Updated by Wouter Wolters almost 4 years ago

  • Status changed from New to Needs Feedback

Please try, if possible, with the TYPO3_7-6 branch.
I found a related ticket that got fixed recently https://forge.typo3.org/issues/72510 in this branch.

Does this resolve your problem?

#3 Updated by Raphael Zschorsch almost 4 years ago

Hello Wouter,

thanks for the quick reply. Unfortunately, the problem still occurs on the TYPO3_7-6 branch.... :(

#4 Updated by Mirko Kaufmann almost 4 years ago

The patch provided in https://forge.typo3.org/issues/72510 does not resolve this issue.

I have the same problem in 7.6.3. I used it in several projects to seperate sys_categories via pid.

e.g.:
<foreign_table_where> AND (sys_category.sys_language_uid = 0 OR sys_category.l10n_parent = 0) AND sys_category.pid = ###PAGE_TSCONFIG_ID###</foreign_table_where>

#5 Updated by Christian Kuhn almost 4 years ago

  • Parent task set to #69617

#6 Updated by Frederick d. Maus almost 4 years ago

it works when i set the constant in the page-TSconfig (edit the page), so not in the normal template!!

TCEFORM.tx_extensionname_domain_model_entry.field.PAGE_TSCONFIG_ID = 20

#7 Updated by Jan Schröder over 3 years ago

I have the same problem.
I use the TYPO3 version 7.6.5

I try to set the PAGE_TSCONFIG_ID in the flexform like this:

<settings.mod3_category>
                        <TCEforms>
                            <label>Kategorie</label>
                            <!--<displayCond><![CDATA[FIELD:switchableControllerActions:=:Collector->category]]></displayCond>-->
                            <config>
                                <type>select</type>
                                <renderType>selectSingle</renderType>
                                <foreign_table>tx_extensionName_domain_model_pagecategory</foreign_table>
                                <foreign_table_where>AND tx_extensionName_domain_model_pagecategory.pid=###PAGE_TSCONFIG_ID###</foreign_table_where>
                                <minitems>1</minitems>
                                <maxitems>1</maxitems>

                                <multiple>0</multiple>
                                <size>1</size>

                                <itemListStyle>Width:250px</itemListStyle>
                            </config>
                        </TCEforms>
 </settings.mod3_category>

And i set the PAGE_TSCONFIG_ID in the PageTSConfig.

I tried different variants like this:

TCEFORM.tx_auwpagesmeta_domain_model_pagecategory.uid.PAGE_TSCONFIG_ID = 5

or this

TCEFORM.tx_auwpagesmeta_domain_model_pagecategory.pid.PAGE_TSCONFIG_ID = 5

or this

TCEFORM.tt_content.pi_flexform.PAGE_TSCONFIG_ID = 5

I have no idea who it works :-(
any suggestions?

@Frederick d. Maus can you explain what is exactly your field?
TCEFORM.tx_extensionname_domain_model_entry.*field*.PAGE_TSCONFIG_ID = 20

#8 Updated by Gerrit Code Review over 3 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/47924

#9 Updated by Gerrit Code Review over 3 years ago

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

#10 Updated by Christian Kuhn over 3 years ago

confirmed, this also affects PAGE_TSCONFIG_ID, PAGE_TSCONFIG_IDLIST and PAGE_TSCONFIG_STR

With 7.6 the "global" flex form setting did not work anymore:

TCEFORM.tt_content.pi_flexform.PAGE_TSCONFIG_ID = 42

Instead, a page TSConfig for a specific field should be done:

TCEFORM.tt_content.pi_flexform.theDataStructure.theSheet.settings\.categories.PAGE_TSCONFIG_ID = 42

Note the flex form field name is "settings.categories" but in page TS, dots in field names have to be escaped: settings\.categories.

The pending patch for 7.6 fixes the bug that the global "TCEFORM.tt_content.pi_flexform.PAGE_TSCONFIG_ID = 42" did not work anymore with a hacky workaround, so the complains this issue is about should be fixed in 7.6 with the next version if the patch gets merged. For master however, the "global" solution is now working, but deprecated. Use specific settings for single flex fields as outlined above, instead. Note this solution in master does currently NOT allow PAGE_TSCONFIG_ID, PAGE_TSCONFIG_IDLIST and PAGE_TSCONFIG_STR for flex form section container elements: There is currently no overall concept to set page TSConfig for single flex form section container elements at all.

#11 Updated by Gerrit Code Review over 3 years ago

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

#12 Updated by Christian Kuhn over 3 years ago

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

#13 Updated by Gerrit Code Review over 3 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47943

#14 Updated by Christian Kuhn over 3 years ago

  • Status changed from Under Review to Resolved

#15 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

#16 Updated by Raphael Zschorsch about 2 months ago

  • Subject changed from PAGE_TSCONFIG_ID not working anymore in TYPO3 7.6.1 to PAGE_TSCONFIG_ID not working anymore in TYPO3 9.5.x
  • TYPO3 Version changed from 7 to 9
  • PHP Version changed from 5.5 to 7.2

Same thing now with TYPO3 9.5.x

Also available in: Atom PDF