After migrating customer - getting error "Document template could not be loaded from document plugin 0"

Hi folks.

I just migrated a customer. When downloading the document templates I just get a Error.txt file, with the error message from the headline.

Prior to the migration they used a document pluging. Before migration I updated DocTmpl.autoEvent and document.archiveProvider to 0, and deleted the plugin reference in userPreferences. 

I debugged this a bit. When I look at the DocTmpl table (through searchengine) I notice, that the doctemp which have the problem all have loadTemplateFromPlugin = 0, and autoevent = 32767.

 

Why is autoevent 32767?

And why isn't loadTemplateFromPlugin updated?

RE: After migrating customer - getting error "Document template could not be loaded from document plugin 0"

Hello,

We actually had the same issue recently when migrating a customer, we solved it using the following query's:

update crm.DOCTMPL set loadTemplateFromPlugin = 0, autoevent_id = 0
update crm.DOCUMENT set archiveProvider = 0 where archiveProvider != 0

I guess autoevent_id 32767 means 'using custom plugin' or something.. (not documented AFAIK)

Av: David Hollegien 29. apr 2020

RE: After migrating customer - getting error "Document template could not be loaded from document plugin 0"

If you have more than the normal plug-in installed, you should be able to see the document plug-in(s) with this SQL statement: select * from "CRM8"."USERPREFERENCE"
where prefsection like 'DocPluginNames'

prefkey is the number that is later stored in the doctmpl.autoevent _id and document.archiveProvider columns.

Edit: and the doctmpl.loadTemplateFromPlugin.

Av: Martin K. Andersen 29. apr 2020

RE: After migrating customer - getting error "Document template could not be loaded from document plugin 0"

Hi Martin.

Yes, I'm aware of that, and normally you're not able to migrate at all, if you haven't disabled/deleted these references.

Thats why it I'm hoping for a best-practice of handling these before an migration of a customer.

@David this is also what I figured, and what in the end solved the solution :).

Av: Kasper Rosenlund 29. apr 2020