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

Bug trows exception on FileToFalUpdateWizard #43

Closed
subnoodle opened this issue Dec 1, 2022 · 5 comments
Closed

Bug trows exception on FileToFalUpdateWizard #43

subnoodle opened this issue Dec 1, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@subnoodle
Copy link
Contributor

Versions

  • DCE version: 2.9.3
  • TYPO3 version: 11.5.19
  • PHP version: 8.1.12

Describe the bug
https://github.com/a-r-m-i-n/dce/blob/master/Classes/UpdateWizards/FileToFalUpdateWizard.php
On line a missing array key is check an old way:

 [ TYPO3\CMS\Core\Error\Exception ]
  Warning: Undefined array key "uid" in /html/typo3/web/typo3conf/ext/dce/Classes/UpdateWizards/FileToFalUpdateWizard.php
  line 100

=> Appears by running the upgrade-wizard (cli or backend)
=> Appears only in some constellations of content we did not find out exactly. But something like: a old non FAL-file-field is there, but not even used once: The read records a NULL / empty and leads to that error

Please make the fix on line 100:
old
if ($affectedDceRow['uid'])
new
if (!isset($affectedDceRow['uid']))

We assume it's related to PHP 8.
Anyways, DCE runs on php 8 and has missleading settings in em_conf.php and composer.php
There i write another issue.

Please fix as soon as possible since we deploy that on many sites adapting the line manually on live systems.

Thank you very much,
Thomas

@MrManga
Copy link

MrManga commented Jan 29, 2023

Same here. Doing Upgrade Wizard, getting these errors. What to do? How to migrate fom old fields to FAL?
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Unable to move media file from "/home/[...]/htdocs/CMS3//fileadmin/Bilder/Seminar-Orte/Kamm-Braeu.jpg" to "/home/[...]/htdocs/CMS3/fileadmin///fileadmin/Bilder/Seminar-Orte/Kamm-Braeu.jpg". | RuntimeException thrown in file /htdocs/CMS3/typo3conf/ext/dce/Classes/UpdateWizards/FileToFalUpdateWizard.php in line 367. Requested URL: http://[...]/typo3/install.php?install[controller]=upgrade&install[context]=backend

EXT:dce Migrate old files (type: group) to FAL (type: inline) Found 3 fields with old file configuration, in 3 different DCEs. The following DCEs are affected:

Thanks for your quick help.

@Zillion01
Copy link

Zillion01 commented Mar 8, 2023

I confirm. I am now upgrading a site from v8 to v11 and when installing 2.9.3 I get in v9

PHP Warning: Invalid argument supplied for foreach() in ../ext/dce/Classes/UpdateWizards/FileToFalUpdateWizard.php line 123

I stick with 2.8.x for now

@subnoodle
Copy link
Contributor Author

Hi Armin, i tired to reproduce the bug.
Bit can'f find the wizard FileToFalUpdateWizard anymore - neither in the backend, nor in the console. Although the wizard-class / -code is still there..
Meets for DCE 2.9.4 / Typo3 11.5.27

@subnoodle
Copy link
Contributor Author

Hi Armin, the bug reappeared again.
I attach the fix for the FileToFalUpdateWizard. It's only an additional if-empty-bracket which solves it.

Can you please put it into the next release. (Please do not ask me for a pull request - i'm not into it)

Thank you, Thomas
FileToFalUpdateWizard.txt

(please rename to php)

@a-r-m-i-n
Copy link
Owner

Should be fixed now

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

4 participants