I had the same issue as it is described in https://www.drupal.org/node/2785915, but it turned out that my case was a bit different.

The panels_node_update_7302() and the panels_mini_update_7301() hooks are failed to update the database because of a special case.
The updates are expecting the query results ordered by pd.did but in our case the firs result had the max pd.did value.

To fix this I added the ORDER BY pd.did to the query and after a successful update it solved my problem.
(If you already updated, then you have manage to run the updates manually again)

Also I think because these updates are supposed to be multi-pass updates they are missing the &$sandbox argument.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

miklos.vekony created an issue. See original summary.

miklos.vekony’s picture

DamienMcKenna’s picture

Status: Active » Needs review

Thanks @miklos.vekony.

markdc’s picture

I patched the module but Update.php doesn't do anything. How do I manually run the update again?

capfive’s picture

+1 here for not being able to run the update again :( thanks for the help, hope we can get this fixed!

miklos.vekony’s picture

I don't know what is the accepted way to do this, but one option can be the following:

  • change the function names to panels_mini_update_7302 and function panels_node_update_7303
  • do the update
  • revert the function name changes
  • set the schema_version to back to 7301 and 7302 in the database (system table)
DamienMcKenna’s picture

I recommend not doing the steps in #6 because that would mean that if panels_mini_update_7302 or panels_node_update_7303 are added in the future they would not run.

miklos.vekony’s picture

@DamienMcKenna Are you sure? As I know if the schema_version stored in the system table in the database is lower than the update hook's number then the update will run. And in the last step I set the correct values in #6. Please correct me if I'm wrong.

DamienMcKenna’s picture

Status: Needs review » Needs work

Yes, I'm positive - if you run an update, remove it and add it back again it won't be ran a second time.

That said, it's entirely reasonable to add new update scripts to this patch to re-run the previous update, which you ought to do.