filefill icon indicating copy to clipboard operation
filefill copied to clipboard

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

Open soulrpg opened this issue 1 year ago • 12 comments

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

soulrpg avatar Jul 10 '23 12:07 soulrpg

Hi @soulrpg

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

IchHabRecht avatar Jul 10 '23 13:07 IchHabRecht

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

prathers avatar Nov 03 '23 13:11 prathers

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.

IchHabRecht avatar Nov 03 '23 16:11 IchHabRecht

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

prathers avatar Nov 03 '23 16:11 prathers

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.

vicluber avatar Jan 24 '24 13:01 vicluber

I can also reproduce the error described above.

DigitalZombies avatar Feb 03 '24 20:02 DigitalZombies

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.

kanow avatar Feb 15 '24 08:02 kanow

@IchHabRecht

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

vnc-jboe avatar Feb 17 '24 17:02 vnc-jboe

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 avatar Feb 17 '24 19:02 IchHabRecht

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.

IchHabRecht avatar Feb 22 '24 10:02 IchHabRecht

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.

vnc-jboe avatar Feb 22 '24 10:02 vnc-jboe

I can confirm too

prathers avatar Feb 22 '24 10:02 prathers