Error During Upgrade to 1.8

Hi all,

We are running 1.7.8 on Windows using IIS.

During the upgrade to 1.8, I we run into “Unexpected error, please contact support”.

This happens at step 90: Add XMR Columns to the Display Table, which is the first step of 1.8.0alpha2.

If I look at the MySQL database after seeing this error, I can see that step 89 has been applied to the DB, and that step 90 (which throws the error) has not. I’ve also learned that I can apply the SQL from step 90 manually without error. This doesn’t cause the upgrade to proceed, though. I’m not seeing PHP errors in the log.

Any ideas? Thanks for looking.

If you’ve applied the SQL from step 90 manually and it hasn’t errored, then assuming you have backups etc then it should be safe enough to skip the step and allow the upgrade to continue.

Alex, thanks for the reply.

I forgot to mention this in the original post, but I’ve tried that as well. Nothing seems to happen when I click “Skip this step”; I can’t see how to get it to move to the next step.

I think you skip, and then resume the upgrade from the button at the top?

I’m not 100% sure because I rarely see the upgrader any longer as with the automated upgrades you only see it if there’s an issue.

Thanks for the help.

Unfortunately, clicking on “skip this step” just seems to make a second “skip this step” message appear, but I’m never able to skip the step.

If I remove that step from the steps folder, I get the same issue as described above on the one that follows it.

An update:

I was able to track down the log:

# logid, runNo, logdate, channel, type, page, function, message, userID, displayID
 '812725', '7028056', '2017-03-31 16:10:59', 'WEB', 'ERROR', '/clock', 'GET', 'SQLSTATE[42S22]: Column not found: 1054   Unknown column \'released\' in \'field list\' Exception Type: PDOException', '0', '0'
 '812724', 'ebf048e', '2017-03-31 16:10:56', 'WEB', 'ERROR', '/update/step/90', 'POST', 'SQLSTATE[42S22]: Column not found: 1054 Unknown column \'released\' in \'field list\' Exception Type: PDOException', '3', '0'

It’s not clear to me what a column “released” has to do with this.

Just to add my experience to this, the “skip this step” button didn’t work for me either when I was testing the upgrades from 1.7.9 to both 1.8.0 rc2 and rc3. It wasn’t possible to skip the steps.

I’ve had a chance to generate some Xibo logs and take a look at exactly what’s happening, and I’ve found a klugey workaround.

What was happening was this: As soon as the 1.8.0-alpha phase completed, /clock started kicking off install Fonts called with options....

This leads to the PDOException mentioned above, because the it uses the column “released” which does not get added to the table “media” until several steps later.

I moved the step that updates the “media” table to the file associated with 1.8.0-alpha, so that it is completed before 1.8.0-alpha2 starts. To be precise, I moved (inserted) lines 57-60 from /install/steps/121.json to line 361 in /install/steps/120.json. The installation appears to have been successful after this change.

This definitely seems like a bug because the application is trying to do this operation before the database is ready.

If the upgrade takes time, /clock will kick off and fail as you have indicated - in fact a bunch of things might do so (such as players connecting, maintenance, etc). That in itself isn’t really an issue as those things will start working again once the upgrade has completed.

Upgrade steps are inserted into the update table and run in sequence. Skip this step marks the step in the upgrade table as “skipped” and should move on.

I wonder if there are certain circumstances that mean “skip this step” actually encounters an error when trying to run - which would explain why it wouldn’t work.

The application stack expects that column to be there in DBVersion 125 and above. So the question is - what is your DBVersion if you look in the version table? If you’re stuck at a step in 1.8.0-alpha2, then the DB version should still be 120.

Thanks for the response, Dan.

In this case, my DBVersion was indeed at 120, but the application was behaving as though it expected the column to be there.

I worked around this by modifying the step files so that the released column would be added before the DBVersion was set to 120.

Just to make sure we aren’t talking cross purposes - the column you added was media.released ?

Specifically, I moved these lines:

{
  "step": "Add released and api ref to media table",
  "action": "ALTER TABLE `media` ADD released tinyint(4) NOT NULL DEFAULT 1, ADD apiRef varchar(254) NULL;"
},

from \install\steps\121.json into \install\steps\120.json.

Hmm, I am at a loss in that case - ill run through some more tests to see if I can work out what was referencing that column. The only obvious place is commented out for anything lower than 125.

I’m pleased you have it upgraded in any case.

I forgot to mention that if you are able to provide your DB backup from 1.7.8 we’d be happy to run the upgrade in a test instance and try to locate the issue that way?

Unfortunately I’ve the same problem from 17.9 to 1.8.0 with manual installation…help!

The only way we can progress this issue (and related issues) is with a full backup of a 1.7.xx CMS installation database that exhibits the issue.

If anyone has one, without confidential information, then please do send it over and we will run through the upgrade ourselves to investigate the issue in detail.