-
Notifications
You must be signed in to change notification settings - Fork 38
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
$incomingFieldArray['colPos'] is accessed before checking if it's available #107
Comments
Hi, |
Hi Nicole,
General problem i've got with another ext: the PHP-Warning leads to a Typo3-Exception: The current prozess stops working then. So, best is to avoid warning from the code then, i suggest. Thank you very much for the awesome content defender! Cheers, Thomas |
Hi @subnoodle Thank you for your answer. The problem is that I run locally an instance with complete error reporting. But I'm not able to trigger any warning. So I really need some configuration that helps me to run into the problem. I'm using the provided test fixtures (https://github.com/IchHabRecht/content_defender/tree/main/Tests/Functional/Fixtures/TSconfig/BackendLayouts) in my local system. |
Hi Nicole, In this case, it occures whenever i add a content element, enter some content and click the save button. The configuration is: Details from Typo3's system -> log [SYS][belogErrorReporting] = 30711 (chaning it to 0 does not change anything) Two backendlayouts: (renamed for uoload only) Worked all fine with PHP 8.0. (as far as i remember) Some automatic typecasts are gone so far i understand possibly the problem, so invalid array keys got critical since then. Any solution & feedback is very appreciated. Many thanks! |
Addition: I discoverd and fixed an error on my provided file subpage.typosript:7 and change the line from I tought it might help, but the behavior stayed the same (after clearing cache, etc). |
Hi all, I still don't know how to reproduce the problem. Open questions:
It seems the colPos is missing from the request but I'm unable to reproduce and understand it. I don't want to commit anything "blindly", so I need to be able to trigger the warning by myself. Any hint would be really appreciated. |
Hi Nicole, In Configuration Preset "Live" there is no problem. The problem only comes up in Debug mode.
No Matter wich Role. The problem exists for Admins, too. The PHP version seems to be decisive. With PHP 7.4 the problem does not exist. From PHP 8.0 and up it exists. I don't know if this helps, but I use content defender in conjunction with the extension: container But the problem is still here although I have uninstalled the container extension. |
Hi @anderlk Thank you for the further information. I'm still not able to trigger a warning with the current given information. Maybe you can give some additional help.
Furthermore: a warning isn't any "real" problem. This is why the exception is shown in debug mode only but not in live configuration. This is how TYPO3 works when notices and/or warnings (or other PHP related problems) are triggered. |
Hi Nicole, I have now installed a test system with a fresh typo3 installation with content_defender and introduction package. After the problem did not exist here, I have rebuilt piece by piece my template extension until I found the bug. Sorry, but it was my own fault. In a completely different TSconfig file the command TCEFORM.tt_content.colPos.disabled = 1 was set. Why this didn't work with your Extesnion, only in debug mode and how this is related to the PHP version is really a mystery to me? Thanks for your great help, without which I would not have found the bug. Maybe has the other reporter a similar problem. Then the bugreport can be closed by me. Regards Andreas |
Thank you very much for all your effort. With the additional information about the disabled colPos field I was finally able to reproduce and fix the issue! |
Hi Nicole, thanks for the Fix und your good work for this helpful Extension. Regards Andreas |
Hi Nicole, thank you very much for your engagement! |
@IchHabRecht, thanks for already having looked into this issue 💪 But I'm afraid your solution isn't covering all cases. My scenario is:
|
@IchHabRecht, just stumped upon this again with a different scenario:
#150 is fixing the issue for this btw. |
When using PHP 8.1 the DatamapDataHandlerHook fails with an backend error message if colPos is not explicitly provided.
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1476107295: PHP Warning: Undefined array key "colPos" in /var/www/html/public/typo3conf/ext/content_defender/Classes/Hooks/DatamapDataHandlerHook.php line 51
The text was updated successfully, but these errors were encountered: