1.7.8 to 1.8.0-rc2 Upgrade error

When upgrading from 1.7.8 to 1.8.0-rc2, I’ve come across the following error.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'announcementsdev2.lktagcampaign' doesn't exist

Skipping the step allows the rest of the upgrade to complete. We are experiencing some issues with layouts and I don’t know whether they’re affected. Please let me know if there’s other information you could use.

Thank you for reporting this issue, i’ve logged it here: https://github.com/xibosignage/xibo/issues/999

This will almost certainly effect existing layouts. I recommend that you roll back to a backup while we try and fix the issue.

I believe i’ve fixed the issue with this commit: https://github.com/dasgarner/xibo-cms/commit/a9a62c9af7c730b133bf8752864d3c9336256cb0

You could patch in those changes before you run the upgrade routine and that should solve your issue. Please let us know.

Thanks,

Thank you Dan. That almost did it. I had to make one additional change along the same lines as your patch.

In lib/Entity/Tag.php at line 170:

$this->campaignIds = [];
    foreach ($this->getStore()->select('SELECT campaignId FROM `lktagcampaign` WHERE tagId = :tagId', ['tagId' => $this->tagId]) as $row) {
    $this->campaignIds[] = $row['campaignId'];
}

Had to be changed to:

        if (DBVERSION >= 129) {
            $this->campaignIds = [];
            foreach ($this->getStore()->select('SELECT campaignId FROM `lktagcampaign` WHERE tagId = :tagId', ['tagId' => $this->tagId]) as $row) {
                $this->campaignIds[] = $row['campaignId'];
            }
        }

It appears to be working now, and the bug in my related thread appears to be resolved. Thanks!

Amazing, thanks. I’ve added your corrections to the issue.

I have also run into this issue and after applying the patch mentioned in this thread I have a new error message.
“SQLSTATE[HY000]: General error: 1366 Incorrect integer value: ‘’ for column ‘ownerId’ at row 1”

Any ideas on how to sidestep it?

Is there a release date for 1.8.0-RC3 so I can just upgrade using that instead?

We’re a little over due as some things have popped up which needed fixing - i’d imagine next week, or perhaps the week after depending on our progress.

The issue you’re having wont get fixed in rc3 unless we can track down the root cause - at the moment I have no idea what that could be.

Would you be willing to send us a pre-upgrade DB dump so we can see why it is failing?

I am having some problems with pre-upgrade backup at the moment. Would a copy of the current database that is stuck at step #43 help?

Yeah that should be sufficient, thanks.

What is the best way to transfer the file? It is 18MB when zipped.

If you can pop it on dropbox or similar and send me the link privately I can get it from there, thanks!

Dan,
In case you didn’t see it, I sent you a private message with a link to the DB for you to examine.

1 Like

Thanks Rob, I did see it and will look at it ASAP

I think the changes in this commit will fix this issue: https://github.com/dasgarner/xibo-cms/commit/9a180eae34c83ae7791c443ae2ab02b5b2d18ed2

Some really early layouts do not have owner information attached to the region/media items inside them - their ownership is determined at the layout level. In those cases, when converting to the new model, we should push down the layout owner.

I tried out this fix and it looks like it works but it lead to another problem.


I honestly don’t believe I have another layout with the same name and unfortunately the “Skip this step” doesn’t actually allow me to skip it.

I just took a look at the database and sure enough I had 3 layouts called “Arts Library” somehow. One was retired, one was the current one I’m using and the other is some weird doppelganger. I renamed the two layouts I wasn’t using via a SQL statement and the upgrade completed without issue.
Thanks for the fix.

It is possible that the weird doppleganger was the failed conversion (perhaps) - in any case, im pleased you have it upgraded!! and of course that the underlying issue is solved - thanks for your assistance.