Bug #15310
closedPHP-Warning in shortcut-bar before DB-upgrade in 4.0beta1
0%
Description
After updating the src from 3.8.1 to 4.0beta1 and just logging into the backend, I get the following warning in the alt_shortcut bar:
Warning: Invalid argument supplied for foreach() in /srv/www/shared/TYPO3core.CVS/typo3/alt_shortcut.php on line 630
because the sys_workspaces table isn't there yet.
The following patch avoids the warning.
(issue imported from #M2102)
Files
Updated by Sebastian Kurfuerst almost 19 years ago
Hi,
this is before you ran the DB compare tool, right?
Greets, Sebastian
Updated by Sebastian Kurfuerst almost 19 years ago
Just read it, I do not think this is an error as after an update, the DB compare is always needed, else stuff will break.
Greets,
Sebastian
Updated by Ernesto Baschny almost 19 years ago
Nevertheless the warning is ugly, as it can be avoided.
The cleanest way would be to force the admin that logs in to the backend of a typo3-src that has been updated to the COMPARE DB screen of the installer and not be presented with the "normal" and potentially broken backend.
Or even better: to the new "upgrade" part of the Installer, which should also do, as step 3, the "COMPARE DB" and "Write to DB".
Updated by Sebastian Kurfuerst almost 19 years ago
Hi Ernesto,
I don't see how an update should be detected in the TYPO3 BE:
the upgrade wizard - this has to be run after the table compare. (Hence the numbering 2-3 in the menu). I agree that this is very un-intuitive, and I am sure the install tool is one of the major parts of TYPO3 which need to be re-written. However, this task might be done for TYPO3 4.5, but not for 4.0 release.
Greets, Sebastian
PS: Of course if you want to implement this, feel free :-)
Updated by Sebastian Kurfuerst almost 19 years ago
Hi,
I'll set this to "won't fix"; because the DB update is necessary in any case when doing an upgrade - it is a definite part of the upgrade procedure.
If we want to make the BE work without any table modification, this means without running the compare DB tool in the install tool, we will end up with a lot of not needed code.
Greets, Sebastian
Updated by Michael Stucki almost 19 years ago
I will reopen this bug because it can be fixed pretty easy I think. Simply checking if the array has at least 1 element before running foreach() should help.