Upgrade to 5.14 fails on updating case views
At least three users on Joomla! with CiviCase enabled have reported the same thing:
- The upgrade hangs at the "Rebuild case activity views" stage of the 5.14.0 upgrade
- Rolling back and repeating yields the same result
- Rolling back, disabling CiviCase, and repeating is successful (*ed. note: this skips the "Rebuild case activity views" step, so this isn't surprising)
- Re-enabling CiviCase succeeds without issue
@eileen had put forward the theory that it was a problem if you have no cases, but that wouldn't explain why re-enabling CiviCase wouldn't have an error. The one spot that checks if there are rows in the view only throws an error if a
SELECT COUNT() returns
0. It also doesn't explain the lack of an error when re-enabling CiviCase.
I had wondered if the database user lacked permission to create views--that someone might have installed CiviCRM with the right permissions, but then later moved to a database configuration where that permission is lacking. However, again, this would cause a problem re-enabling CiviCase, and nobody has reported such a problem.
The only thing that seems at all promising to me is that the
CRM_Case_BAO_Case::createCaseViews() function runs
CRM_Core_TemporaryErrorScope::ignoreException(), and maybe that somehow conflicts with the Joomla upgrade runner.
The main purpose of this issue is to have a common place to document who's having these problems. Even though the upgrade affects all CMSes, I opened this ticket here in dev/joomla because everyone encountering problems has been on Joomla!, which is quite improbable otherwise. Here are the relevant Mattermost threads: