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

Check page tree integrity throw exception under TYPO3 12 #113

Closed
mediaessenz opened this issue Mar 12, 2024 · 5 comments
Closed

Check page tree integrity throw exception under TYPO3 12 #113

mediaessenz opened this issue Mar 12, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@mediaessenz
Copy link

mediaessenz commented Mar 12, 2024

If I start the command with ddev typo3 dbdoctor:health -m interactive I get this exception in the console:

Check page tree integrity
-------------------------

 Class: PagesBrokenTree
 Actions: remove
 This health check finds "pages" records with their "pid" set to pages that do
 not exist in the database. Pages without proper connection to the tree root are never
 shown in the backend. They are removed.

Uncaught TYPO3 Exception PDOStatement::bindParam(): Argument #4 ($maxLength) must be of type int, null given
thrown in file /var/www/html/vendor/typo3/cms-core/Classes/Database/Driver/DriverStatement.php
in line 104

Tried it with TYPO3 12.4.11 and 12.4.12 under PHP 8.2.16

@lolli42
Copy link
Owner

lolli42 commented Mar 18, 2024

mmmh. I don't understand where this comes from. since cli does not print backtraces properly, could you maybe hack that place and print_r() or var_dump() a backtrace, and paste it here, to see how this is triggered?

@mediaessenz
Copy link
Author

mediaessenz commented Mar 18, 2024

I think I found the bad guy:
It's this call inside the RecordsHelper::getRecord method of your extension, which produces the exception:

$statement->bindParam(1, $uid, Connection::PARAM_INT);

As far as I see, this bindParam method of the doctrine AbstractStatementMiddleware is deprecated (see doctrine/dbal#5563) and bindValue should be used instead.

@mediaessenz
Copy link
Author

mediaessenz commented Mar 18, 2024

Maybe the problem come from the choosen database driver, which is 'pdo_mysql' in my case.

@mediaessenz
Copy link
Author

Replacing all bindParam calls in this RecordsHelper class with bindValue solve the problem.

lolli42 added a commit that referenced this issue Mar 19, 2024
@lolli42 lolli42 added the bug Something isn't working label Mar 19, 2024
@lolli42
Copy link
Owner

lolli42 commented Mar 19, 2024

release 0.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants