-
Notifications
You must be signed in to change notification settings - Fork 37
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
Empty $result['databaseRow']['colPos'] array gets interpreted as 0 #92
Comments
Hi @kosimas, Would you mind to share your actual problem and how to reproduce it. I can't copy&paste any code to solve a problem I cannot reproduce. Thank you very much. |
Hey @IchHabRecht, |
Hi @kosimas, I tried to reproduce the problem, but was unable to do so. For an IRRE child element the correct colPos configured in overrideChildTca -> columns -> colPos -> config -> default is taken into account. if this colPos isn't configured in the backendLayout configuration there shouldn't be any overlapping. Are you using any other extension that handles colPos configuration on it's own and maybe has strange site effects with content_defender? |
Hey @IchHabRecht, I have added some information and instructions to the readme file I hope this will help to understand the problem. |
#75 |
This also happens if you have "unused content elements". E.g. when upgrading a website and using new backend layouts, with different |
|
see #109 |
content_defender/Classes/Form/FormDataProvider/TcaCTypeItems.php
Line 39 in 8258b80
This line causes issues with new IRRE inline elements that have for example a non existing colPos of 999.
If a inline child element is created, it will load all allowed CType values for colPos 0.
Before setting $colPos to 0, it should be checked if $result["processedTca"]["columns"]["colPos"]["config"]["default"] exists and if so,
$colPos should get the value.
A solution could look like this(this is probably doable with less code)
Edit:
Steps to reproduce
This problem can be reproduced by creating an TCA inline element like this:
Then create a content element that is using this element.
After that try to add this content element to a page that has text elements disallowed on colPos 0.
Now creating child text elements inside the inline element is not working properly.
Typo3: ^10.4, ^11.5
Content Defender: ^3.2
The text was updated successfully, but these errors were encountered: