In the end, the easiest and quickest thing was just to save the database, reload all of ZC, then import the saved database and template.

It's working now, except for a problem with the email, but that's a different story.

Thank you very much for all your help, people.