If upgrading from early versions of Views Bookmark, the upgrade path does not work. It looks like a find/replace spree must have gotten loose on the flag.views_bookmark.inc file, where several table names were changed from "views_bookmark*" to "flag*".

Comments

quicksketch’s picture

StatusFileSize
new3.43 KB

I found one more issue in our upgrade path. Thanks clients using ridiculously old versions of modules! ;) We're currently running all the old upgrades from Views Bookmark if necessary based on the current schema version of Views Bookmark. Our logic includes:

  // Update Views Bookmark to the latest schema.
  $vb_schema = drupal_get_installed_schema_version('views_bookmark');
  $ret = array();
  if (!empty($vb_schema) && $vb_schema <= 5102) {
    for ($version = $vb_schema; $version <= 5102; $version++) {
      $update_function = 'flag_views_bookmark_update_'. $version;
      if (function_exists($update_function)) {
        $ret += $update_function();
      }
    }
  }

Looking at the start of our for loop, you see that we're running an update starting at the current schema version. Meaning that the current schema update is run, but we're already on that version so it's causing it to perform that update twice (potentially causing several errors). Our for loop should instead start one *after* the current schema and read:

    for ($version = $vb_schema + 1; $version <= 5102; $version++) {
quicksketch’s picture

Status: Needs review » Fixed

Committed to both branches.

mooffie’s picture

(I've read the patch and it looks alright.)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.