1.8 Alpha3 Installation with CMS white label

We are currently upgrading from 1.7.4 on a LAMP server (PHP 5.6), where the previous version had a CMS White label theme.
The theme was manually copied from the 1.7.4 version, because during installation, an error appeared that the theme was missing.
But this was certainly a bad idea, because now during the upgrade steps, we are blocked in step 41 Upgrade Layouts.

So the questions :
is this version compatible with a CMS white label installation ?
if yes, how can we do the upgrade ? Tweak the white label manually from standard 1.8 theme ?
if not, how can we revert back to a standard CMS theme, I assume we need to update some database tables ?

Thanks

I suspect that the theme doesn’t have anything to do with the failed upgrade step (unfortunately). You can try with the default theme by modifying the GLOBAL_THEME_NAME value in the setting table, reverting it back to default.

UPDATE `setting` SET `value` = 'default' WHERE `setting` = 'GLOBAL_THEME_NAME';

Failing that you could run the upgrade layouts step with a file log enabled and send us the output (it should show the logged error).

To do that you add a line to your settings.php file:

$logHandlers = [new \Monolog\Handler\StreamHandler(PROJECT_ROOT . '/log.txt')];

Which will create a file in your CMS installation root folder.

I’m reverted back to the default theme, and keep blocked on layout upgrade, but don’t see any log file after having added the line in settings.php

There is some instructions for logger in index.php, is it worth to change this :
// Create a logger
$logger = new \Xibo\Helper\AccessibleMonologWriter(array(
‘name’ => ‘WEB’,
‘handlers’ => [
new \Xibo\Helper\DatabaseLogHandler()
],
‘processors’ => array(
new \Xibo\Helper\LogProcessor(),
new \Monolog\Processor\UidProcessor(7)
)
), false); ==> true instead ?

You could put the whole system in “test mode” by running the following SQL:

UPDATE `setting` SET `value` = 'test' WHERE `setting` = 'SERVER_MODE';

That will enable the highest level of logging

1 Like

I have an error appearing in step 41 now:

                        1.8.0-alpha                            Upgrade LayoutsMissing  argument 1 for Xibo\Upgrade\LayoutStructureStep::__construct(), called in /home/m21dev/www/daxpro/lib/Entity/Upgrade.php on line 85 and defined

But I wonder if I need to go back to the start of upgrading, as I have recreated the database from our 1.7.4 backup. But the upgrade starts directly at step 41 even after the database recreation. There must be some information cached somewhere outside the DB ?

I put a copy of the log generated (transformed into pdf format for uploading constraints) log.pdf (226.8 KB)

Seems we have an issue with the upgrade between pre 1.8 and 1.8.0-alpha3… can you please try upgrading in stages while we investigate and fix?

You could go from 1.7.4 to 1.8.0-alpha2 and then 1.8.0-alpha2 to 1.8.0-alpha3.

The upgrade steps are cached and stored in the DB, if you are dropping and restoring the DB then they will be cleared.

We have reverted the DB back to version 1.7.4, and have installed the 1.8.0.-alpha2. The update did continue, up to step 102, where we strangely have a mix of alpha2 and alpha3 steps.
There must be some data cached somewhere that was not cleared by the update of php files and reload of the database. But we can’t find where ?
Here is enclosed the list of update steps we have now :180alpha_update.pdf (96.2 KB)

When we are trying to run step 102, this error message appears : PHP step class does not exist

You need to DROP the partially upgraded database, rather than restoring over the top of it. The upgrade steps are copied from code to DB when the upgrade first runs.

Update from 1.7.4 to 1.8.0alpha2 is good, steps 1 to 102 passed without problem.
After having installed 1.8.0alpha3, by remplacing 1.8.0alpha2 files, the upgrade is now blocked in step 103, Convert MyISAM tables to InnoDB.
Error message is :
Missing argument 1 for Xibo\Upgrade\MyIsamToInnoDbStep::__construct(), called in /home/m21dev/www/daxpro/lib/Entity/Upgrade.php on line 85 and defined

I have a suspicion you are using this link instead of this link

Can you confirm? and if do can you try with the rev2 release files?

Yes, I was using the first link. I’ve just installed the rev2, replacing previous alpha3 (and not on top !),
same blocking, slightly different (line number) error message :
Missing argument 1 for Xibo\Upgrade\MyIsamToInnoDbStep::__construct(),
called in /home/m21dev/www/daxpro/lib/Entity/Upgrade.php on line 91 and
defined

Sounds like the same problem we ran into.

@epystem I take it you are also running on Windows?

The solution is staring me in the face - very sorry!

Can you try a little code change for me? If it works I will get it committed and patched into the release archive.

Change this file /home/m21dev/www/daxpro/lib/Entity/Upgrade.php, Line 91 replacing:

$object = new $class();

with

$object = new $class($this->store, $this->log, $this->config);

I’ve done the change, upgrade goes further, new error message:
Accessing static property Xibo\Service\ConfigService::$dbConfig as non static

Do I need to change $dbConfig in /home/m21dev/www/daxpro/lib/Service/ConfigService.php as non static ?

Which upgrade step is that on?

No you do not need to change it to be non-static. I’ve searched through the code looking for places where that variable is referenced non-statically and can’t find anything… so any extra information you can provide would be useful.

I’m still in step 103, Convert MyISAM tables to InnoDB. Is there another place where I can find more log for you ?

A log file should be created in install/install_log.txt - it would be good to delete this file completely and then run the step that is failing again so that we get just the effected log messages

Here is the fresh log (note : change the extension from pdf to txt, as I can’t upload txt files)
log - Copie.pdf (22.3 KB)

OK, so that helped a lot… the relevant section of log is:

[2016-04-14 11:12:48] WEB.ERROR: Unable to run upgrade step. Message = Accessing static property Xibo\Service\ConfigService::$dbConfig as non static [] {"uid":"db5e7ca","method":"POST","route":"/update/step/:id","userId":1}
[2016-04-14 11:12:48] WEB.ERROR: #0 /home/m21dev/www/daxpro/lib/Upgrade/MyIsamToInnoDbStep.php(53): Slim\Slim::handleErrors(2048, 'Accessing stati...', '/home/m21dev/ww...', 53, Array) #1 /home/m21dev/www/daxpro/lib/Entity/Upgrade.php(96): Xibo\Upgrade\MyIsamToInnoDbStep->doStep(Object(Slim\Helper\Set)) #2 /home/m21dev/www/daxpro/lib/Controller/Upgrade.php(118): Xibo\Entity\Upgrade->doStep() #3 [internal function]: Xibo\Controller\Upgrade->doStep('103') #4 /home/m21dev/www/daxpro/vendor/akrabat/rka-slim-controller/RKA/Slim.php(79): call_user_func_array(Array, Array) #5 [internal function]: RKA\Slim->RKA\{closure}('103') #6 /home/m21dev/www/daxpro/vendor/slim/slim/Slim/Route.php(468): call_user_func_array(Object(Closure), Array) #7 /home/m21dev/www/daxpro/vendor/slim/slim/Slim/Slim.php(1357): Slim\Route->dispatch() #8 /home/m21dev/www/daxpro/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #9 /home/m21dev/www/daxpro/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #10 /home/m21dev/www/daxpro/lib/Middleware/Actions.php(133): Slim\Middleware\MethodOverride->call() #11 /home/m21dev/www/daxpro/lib/Middleware/Theme.php(73): Xibo\Middleware\Actions->call() #12 /home/m21dev/www/daxpro/lib/Middleware/WebAuthentication.php(133): Xibo\Middleware\Theme->call() #13 /home/m21dev/www/daxpro/lib/Middleware/CsrfGuard.php(62): Xibo\Middleware\WebAuthentication->call() #14 /home/m21dev/www/daxpro/lib/Middleware/State.php(103): Xibo\Middleware\CsrfGuard->call() #15 /home/m21dev/www/daxpro/lib/Middleware/Storage.php(46): Xibo\Middleware\State->call() #16 /home/m21dev/www/daxpro/lib/Middleware/Xmr.php(38): Xibo\Middleware\Storage->call() #17 /home/m21dev/www/daxpro/vendor/slim/slim/Slim/Slim.php(1302): Xibo\Middleware\Xmr->call() #18 /home/m21dev/www/daxpro/web/index.php(120): Slim\Slim->run() #19 {main} [] {"uid":"db5e7ca","method":"POST","route":"/update/step/:id","userId":1}

Can you please make another code change? In /home/m21dev/www/daxpro/lib/Upgrade/MyIsamToInnoDbStep.php on Line 53

Replace:

WHERE TABLE_SCHEMA = \'' . $this->config->dbConfig['name']  . '\'

With:

WHERE TABLE_SCHEMA = \'' . ConfigService::$dbConfig['name']  . '\'

This will need a better fix going forwards, but that should get you through this hiccup


EDIT: FYI this is the full fix: https://github.com/dasgarner/xibo-cms/commit/88b033ae04bdb7f75c8f491dcd314820627d8e55

After the limited replacement, I’ve had another fatal error message (but I missed to copy it, it was roughtly saying that dbconfig was not declared).
Then, I’ve implemented all changes in the fix mentionned, but now I’m blocked at start page.
Here is the new fresh log, I’ve seen anything it unfortunately.log - Copie2.pdf (94.4 KB)