Bug #15310

PHP-Warning in shortcut-bar before DB-upgrade in 4.0beta1

Added by Ernesto Baschny almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-12-28
Due date:
% Done:

0%

TYPO3 Version:
4.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

alt_shortcut-40beta1.diff View (913 Bytes) Administrator Admin, 2005-12-28 11:24

History

#1 Updated by Sebastian Kurfuerst almost 14 years ago

Hi,
this is before you ran the DB compare tool, right?

Greets, Sebastian

#2 Updated by Sebastian Kurfuerst almost 14 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

#3 Updated by Ernesto Baschny almost 14 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".

#4 Updated by Sebastian Kurfuerst almost 14 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 :-)

#5 Updated by Sebastian Kurfuerst almost 14 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

#6 Updated by Michael Stucki almost 14 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.

#7 Updated by Michael Stucki almost 14 years ago

Fixed in CVS.

Also available in: Atom PDF