Recovering lost custom reports after migrations / updates

Published
2014-02-10 15:53
Written by

I’m not sure if this will be any use to anyone else, but I needed somewhere to write down the process, so you never know. After migration some of our custom reports have gone walkabouts and are showing this error message… 

"Could not find template for this report instance"

It seems that something has become broken and the path to the report and the report template no longer match, so reregistering / creating brings the reports back to life.

I think due to the changes in how a report should now be created (i.e. there are now better ways of creating reports, but a lot of us have legacy reports) I can’t seem to find the register report link, however it is still lurking behind the scenes at - /civicrm/admin/report/register

Fill in the values from your old db record. Everything should pretty much be there at the appropriate ID row from civicrm_report_instance apart from class, what that may be largely depends on how the report was created in the first place.

Then you can recreate a report from the template (/civicrm/admin/report/template/list?reset=1) picking the correct report you just added and you will probably find you need to reset filter and field criteria. If it was available in the reports menu, add it to the menu through the report settings and voila your report is back, albeit probably with an new url.

Filed under

Comments

Chris - can you tell us what migration and/or which versions of CiviCRM caused the disappearance of the custom reports? This might help in identifying and correcting a bug in the migration script, or at the very least creating more robust migration guidelines. Thanks.

4.1.5 to 4.4.3 We do have a lot of odd custom stuff though, so that could be playing a factor.