Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing $LANG variable in Collection using tt_content #343

Open
Danny-HPH opened this issue Feb 12, 2025 · 5 comments
Open

Missing $LANG variable in Collection using tt_content #343

Danny-HPH opened this issue Feb 12, 2025 · 5 comments
Labels

Comments

@Danny-HPH
Copy link

Describe the bug
If a 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:

  1. Create an Element that uses a Collection with foreign_table: tt_content
  2. Insert a Typo3 Form element into it
  3. Open frontend and get the error

Expected behavior
The Form element gets the $LANG variable in this scope.

Screenshots
Image

TYPO3 Version
13.4.5

Content Blocks Version:
1.1.6

@nhovratov
Copy link
Contributor

Hey, I don't think it's a good idea to put a form plugin into a Collection. Have you considered a container?
Anyway, this is not a Content Blocks issue. Could you please forward this issue to TYPO3 forge?

@Danny-HPH
Copy link
Author

ok thanks, i added a forge issue.

@nhovratov
Copy link
Contributor

Related issue on forge: https://forge.typo3.org/issues/106158

@nhovratov
Copy link
Contributor

Could you please provide the YAML configuration so we can quickly reproduce it?

@Danny-HPH
Copy link
Author

Sure:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants