Exhibit Builder 2.0 upgrade script is not functional

I'm finding that the Exhibit Builder upgrade script is non-functional on all my sites that have existing exhibits. I've upgraded from 1.5.3 on two separate sites. For the first site, I did not deactivate the Exhibit Builder plugin before upgrading Omeka; on the second, I did. In both cases the "Upgrade" button basically just refreshes the page. Both sites in question have existing exhibits and are otherwise fully functional after the upgrade (including running updates for other plugins such as Simple Pages). Is this a known bug and/or is there a known fix. I don't want to lose my exhibit content if possible.




It is a known bug that occurs under certain known conditions. We're working hard on a fix.

Thanks Patrick. Is there a place I can track that (GitHub issue # etc...)?

There are a couple of problems we're aware of with the Exhibit Builder upgrade process.

The first is a general upgrade problem with all plugins: Omeka hides the error message and just appears to refresh the plugin page.

Then, there's some actual problem with the ExhibitBuilder's upgrade. The one we're aware of arises when pre-existing exhibits have some pages and sections with the same slug.

Both already have provisional fixes committed on Github: one to Omeka to restore the proper error screen, and several to the ExhibitBuilder to correct the upgrade. The ExhibitBuilder's "master" branch has the corrected upgrade code.

The issue is, with a half-complete upgrade like this, you either need to do some manual database spelunking and code commenting to only do the remaining parts of the upgrade process, or you need to start fresh from a backup.

Shame on me for not having a backup then because I (probably) just effectively lost 70 student exhibits. Not the end of the world in my case, but I'm really surprised you're still packaging the Exhibit Builder while it contains this major bug.

As long as you don't uninstall the Exhibit Builder plugin, there's no actual data lost even though the upgrade script fails. It just becomes fairly annoying to determine where the upgrade stopped and what steps you need to skip to resume it.

Assuming this was the duplicate slugs issue (the only issue with upgrading we've found so far), the problem happened while Exhibit Builder was converting your old sections to pages. The pre-existing pages and sections would still be in the database.

If you're interested, the general process for resuming the upgrade would be:

  1. Even though they're currently in a broken state, make an export or backup, at least of the Exhibit Builder tables exhibits, exhibit_pages, exhibit_page_entries, and sections.
  2. Update the Exhibit Builder plugin code to a version that doesn't have the bug (like the current master branch, or in the future, 2.0.1)
  3. Then, comment out all the steps in the upgrade script that you've already done. In this case, you'd probably need to comment out lines 112-123 of the current master code.
  4. Finally, you'd need to look in your exhibit_pages table and manually delete any new rows that were already added by the failed upgrade (these would be the same as your old sections). Depending on which was the offending section, there could be no new rows, or there could be rows for most of the preexisting sections.

After all that, you'd be able to run the upgrade the through the admin interface again.

After writing all that out, I realized it wouldn't be too difficult to handle this situation automatically in the upgrade script.

Rather than having to follow all those instructions, in the latest "master" of Exhibit Builder (and the upcoming 2.0.1), the upgrade will automatically recover from this kind of failed previous upgrade.

So, instead of all those steps, you should be able to just update the ExhibitBuilder plugin code and click Upgrade in the admin interface.

Brilliant, thanks!

Hooray for progress, and big thanks for John's awesomeness!

ExhibitBuilder repo if you want to grab it quick. Otherwise, it'll be bundled with Omeka 2.0.1 bugfix release soon.