zikula/core — Issue #177: Optimize upgrade routine
Author: hvorragend
Created: 2011-11-24 17:30:47+00:00
State: open
Labels: Task

I think that we should optimize the Zikula upgrade.

If you had a theme before called for example "web2", you cannot use this theme, because we need an uppercase theme name and the old theme isn't a gettext theme.

If this theme doesn't exist in Zikula 1.3 then you see this:

```
Uncaught exception Leere 'page' in der Page-Konfiguration vom Theme spezifiziert (Datei master.ini). in /www/htdocs/foo/lib/Zikula/View/Theme.php line, 697
#0 /www/htdocs/foo/lib/Zikula/View/Theme.php(226): Zikula_View_Theme->load_config()
#1 /www/htdocs/foo/lib/Zikula/View/Theme.php(275): Zikula_View_Theme->__construct(Object(Zikula_ServiceManager), NULL)
#2 /www/htdocs/foo/lib/Zikula/Core.php(478): Zikula_View_Theme::getInstance()
#3 /www/htdocs/foo/upgrade.php(65): Zikula_Core->init(4095)
#4 {main}
```

But what should a user do?
He cannot install the new Z13-theme in his old environment and the old Z12 theme doesn't work in Zikula 1.3.
He has to hack the database tables.

I was now on several occasions prior to this problem and I was always annoyed. The database upgrade is already started and the error appears after the first db changes. So I have to constantly import a backup and try to continue.

I suggest that in such a case, the upgrade will set the theme name automatically to an available theme.