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

Call to undefined method Doctrine\DBAL\Result::fetchColumn() #73

Open
soulrpg opened this issue Jul 10, 2023 · 12 comments
Open

Call to undefined method Doctrine\DBAL\Result::fetchColumn() #73

soulrpg opened this issue Jul 10, 2023 · 12 comments

Comments

@soulrpg
Copy link

soulrpg commented Jul 10, 2023

fetchColumn() is not present in DBAL v3.
image
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-96287-DoctrineDBALv3.html

@IchHabRecht
Copy link
Owner

Hi @soulrpg

should be fixed once https://github.com/IchHabRecht/filefill/tree/bugfix/typo3-12-4-be-support is merged.

@prathers
Copy link

prathers commented Nov 3, 2023

The fix leads to Core: Error handler (BE): PHP Warning: Undefined array key "config" in /var/www/html/vendor/typo3/cms-backend/Classes/Form/Container/FlexFormElementContainer.php line 56

@IchHabRecht
Copy link
Owner

Hi @prathers,

It would be really nice if you could give me some more information about your problem and how I'm able to reproduce the warning.

@prathers
Copy link

prathers commented Nov 3, 2023

Yeah, sorry - I know..
The error appear after patching the https://github.com/IchHabRecht/filefill/tree/bugfix/typo3-12-4-be-supportand enabling the filefill in the Storage. If I remove EXT:filefill, the error disappear

@vicluber
Copy link

vicluber commented Jan 24, 2024

Same issue here.
I have local, staging and production deployments. After the update from Typo3 10 to 12 (going through 11) Filefill stopped working.
I can't access to the "[fileadmin/ (auto-created)" record in the system root for enabling Filefill because I get this warning:
PHP Warning: foreach() argument must be of type array|object, string given in /var/www/html/vendor/typo3/cms-backend/Classes/Form/Container/FlexFormSectionContainer.php line 80

Then if I go to the FlexFormSectionContainer.php and condition the foreach with a:
"if(is_iterable($flexFormDataStructureArray['el'])){}"

Then I get the other error: Call to undefined method Doctrine\DBAL\Result::fetchColumn() in /var/www/html/vendor/ichhabrecht/filefill/Classes/Form/Element/ShowMissingFiles.php line 71

fetchColumn seems to be deprecated Typo3 12.0: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-96287-DoctrineDBALv3.html

->fetchOne() - instead of ->fetchColumn(0)

Fair enough if I replace the fetchColumn with a fetchOne the error goes away but the $flexFormDataStructureArray['el'] was empty so there is no Flexform being rendered (I believe that's what should happen right?)

I'm using Typo3 12.4.10 and Filefill 4.3.0 and the database comes from Typo3 10 migrated with the "Update wizard" tool from Typo3.

PD: Production deployment was not displaying the first "warning", it was going straight to the next "error" with fetchColumn(), probably because of the debug=true config on local and staging.

@DigitalZombies
Copy link

I can also reproduce the error described above.

@kanow
Copy link

kanow commented Feb 15, 2024

Hey, after update TYPO3 to 12.4.11 (last security update) I can't edit my storages in backend. It's more related to #72.
If Whoops Exception handler is activated, I have the error mentioned in #72, if not activated I have the error message from here with fetchColumn() missing.

@vnc-jboe
Copy link

@IchHabRecht

Why do you use fetch instead of fetchNumeric, as the fetch method is deprecated? Is there any reason for using it?

@IchHabRecht
Copy link
Owner

Hi @vnc-jboe

Thank you for your question. I wrote content_defender long time ago. And imagine, but there wasn't any other function that used to be called to retrieve rows from the database. Using a deprecated method for compatibility reasons is fine as this is why the function was deprecated and not simply removed.

@IchHabRecht
Copy link
Owner

If anyone can test the current state of the branch https://github.com/IchHabRecht/filefill/tree/bugfix/typo3-12-4-be-support I'll be happy to merge and release that update.

@vnc-jboe
Copy link

Hi @IchHabRecht

From my point of view, current state of the branch https://github.com/IchHabRecht/filefill/tree/bugfix/typo3-12-4-be-support looks fine.

@prathers
Copy link

I can confirm too

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

No branches or pull requests

7 participants