I've had the above error on a couple of upgrades recently - one was an upgrade to 5.57.3 on a test system and another when upgrading the 'Report Plus' extension (see below). In both cases the upgrade stopped but appeared to be successful. I looked at the code (attached) but couldn't figure out what the problem is. Both were Drupal 7 systems. Can anyone help (please) ?
5 Answers
If you are on a recent version of CiviCRM you can run the Managed.reconcile api through the api explorer - in this instance I'm running it to reconcile extended reports - you can do all extensions at once, or one or two at a time. You are looking to see which extension hits an error while reconciling - the extension with the issue might not be the one that you are experiencing the error on.
Generally all declared managed entities should have an entry in the civicrm_managed
table - eg for this entity https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport/blob/21b4be5d01384caf73ffe9c9e92f187d8f6cf84d/CRM/Extendedreport/Form/Report/RelationshipExtended.mgd.php I can find a row in civicrm_managed and the entity_id matches the id of the OptionValue in civicrm_option_value (note that ReportTemplate
is a v3 api alias for OptionValue
- & Extended report uses both at the moment as it is migrating to v4
Thanks to Eileen, who said 'Generally you see that when there is an entry in civicrm_option_value but not in civicrm_managed for a report being registered by the extension & the site will keep getting the error until it is fixed'. The culprit seemed to be an entry from the ReportPlus extension in civicrm_option_value that remained after I uninstalled this extension. This record had the label 'Activity Detail Plus'
-
Did you just delete the record 'Activity Detail Plus' and the error went away? Commented Feb 7, 2023 at 1:22
-
Neither of the 2 systems that had the extension were using any of the ReportPlus reports so I used uninstalling as a quick way of identifying mismatched items. In both cases it was this 'Activity Detail Plus' record which I deleted. I reran the 5.57.3 upgrade on one system and it then worked. On the other system I believe that although the upgrade failed on the last step, it all worked & there's no damage. If you didn't want to remove ReportPlus it would be worth deleting this record & retrying. Commented Feb 7, 2023 at 8:08
I just ran into a similar error, is this related or a separate issue? In this case, the upgrade did not complete.
-
-
Keith actually at that stage of the upgrade, the upgrade did complete, but it is having a hard time loading the final update complete page due to the extension conflict. Check your civicrm_domain table in your MySQL and see what the version is. If it is correct, you are OK. Update the extension all should be well. Commented Feb 20, 2023 at 0:15
Thank you for this. Fixed by disabling the Reports Plus extension (v 2.6.2) which we were attempting to use the same time as Extended Reports (v. 5.21) on CiviCRM 5.58.1
I found my culprit with this method. What I also figured out is that when I disabled Mosaico there were many references left in the database and I got the "missing" error message. Ultimately I deleted every reference in my civicrm database and then the errors went away and now my site is clean. It seems that uninstalling and then deleting a specific extension does not remove all references ? That said, thank you for the api4 method to uncover a culprit Eileen.