Project

General

Profile

Actions

Bug #106158

open

Missing $LANG variable in Collections using tt_content

Added by Danny Luda 4 months ago. Updated 3 months ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2025-02-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Describe the bug
If a Content Blocks Collection is using tt_content as a foreign_field and for example a typo3 form is added in this. The $LANG variable is not available in this scope and we get an Exception:
PHP Warning: Undefined global variable $LANG in /html/typo3-composer/vendor/typo3/cms-form/Classes/Domain/Configuration/FlexformConfiguration/Processors/FinisherOptionGenerator.php line 96

To Reproduce
Steps to reproduce the behavior:

Create an Element that uses a Collection with foreign_table: tt_content
Insert a Typo3 Form element into it
Open frontend and get the error
Expected behavior
The Form element gets the $LANG variable in this scope.

TYPO3 Version
13.4.5

Content Blocks Version:
1.1.6

Related issue in Content Blocks: https://github.com/FriendsOfTYPO3/content-blocks/issues/343

YAML configuration:

name: pxproject/specialbox
group: pxproject_content_elements
prefixFields: false
basics:
    - TYPO3/Appearance
fields:
  - identifier: image
    type: File
    maxitems: 1
    minitems: 1
    allowed: common-image-types
  - identifier: content
    type: Collection
    minitems: 1
    required: 1
    foreign_table: tt_content

Files

Actions #1

Updated by Nikita Hovratov 4 months ago

  • Description updated (diff)
Actions #2

Updated by Nikita Hovratov 4 months ago

  • Description updated (diff)
Actions #3

Updated by André Buchmann 3 months ago · Edited

Heyho I get the same error message in the Surfcamp 2024 project. This project doesn't use content blocks.
https://github.com/TYPO3incubator/surfcamp-team-success

Happens on the most simple page "Whitepaper" in the project with a real simple form. The form has only the "Confirmation Message" finisher. No Finisher Overrides in the CE.

The error only occures if there is no backend session.

Maybe it's related to PageView and the RenderBlockViewHelper.php 🤔 Investigation started...

Actions #4

Updated by André Buchmann 3 months ago

The issue in the surfcamp project was related to an old implementation of the RenderBlockViewHelper and has been fixed in the project itself.

https://github.com/TYPO3incubator/surfcamp-team-success/commit/68661f89a8abd1fef71e8238751a9aee4fab2965

Actions #5

Updated by Georg Ringer 3 months ago

could not reproduce that on main currently

Actions #6

Updated by Georg Ringer 3 months ago

  • Status changed from New to Needs Feedback

I need a way to reproduce that, ideally on main, ideally without contentblocks. cant reproduce with contentblocks on main

Actions

Also available in: Atom PDF