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

Undefined array key "colPos" #801

Open
oooFreaKooo opened this issue Jan 19, 2025 · 1 comment · May be fixed by #806
Open

Undefined array key "colPos" #801

oooFreaKooo opened this issue Jan 19, 2025 · 1 comment · May be fixed by #806

Comments

@oooFreaKooo
Copy link

I came across an issue, which killed my entire Project for some reason.
This is the error message i got:

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Undefined array key "colPos" in /var/www/html/vendor/friendsoftypo3/headless/Classes/ContentObject/JsonContentContentObject.php line 186

I got the issue fixed by adjusting the code:

  • Inside: vendor\friendsoftypo3\headless\Classes\ContentObject\JsonContentContentObject.php
  • Line 185 was changed
  • From: if ($groupingEnabled && ($element['colPos'] ?? 0) >= 0) {
  • To: if ($groupingEnabled && isset($element['colPos']) && $element['colPos'] >= 0) {

Im not sure why this error started accuring suddenly. But for now it has been fixed.

@twoldanski
Copy link
Collaborator

twoldanski commented Jan 20, 2025

Hi @oooFreaKooo this not a bug but misconfiguration, you can have colpos aka grouping of content elements enabled (and column is required) or not, but can't have both ways on the same page.

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

Successfully merging a pull request may close this issue.

2 participants