Document template error

When I go to Administration > Email and Documents > Document Templates and then click on certain file names, I get the following error:

"An unexpected event has occurred: EConvertError: Format '% ' invalid or incompatible with argument"

This only happens for some of the files in the list, not all of them.

The system log gives this info:
Jan 26 2016 15:44:29.243 12920 132 1 UserActionException,ErrMsg Format '% ' invalid or incompatible with argument
Jan 26 2016 15:44:29.244 12920 132 1 : EConvertError: Format '&#37; ' invalid or incompatible with argument<br>
Jan 26 2016 15:44:29.414 12920 132 1 Creating stack-trace ID:594344278. Error message is "Format '% ' invalid or incompatible with argument"

I have a feeling this problem is due to some permissions issue with the documents stored on the sage server.

Does anyone have any ideas how I could solve or troubleshoot this problem?

  • 0

    Steven

    What version of Sage CRM are you using?

    I have not seen that error before. But my gut is telling me that it is an issue with either the document name or the path. The '% ' is the % symbol.

    Are the documents that fail to open associated with a Company, Person or only a user? Were they filed by manual upload or programmatically? Documents can be added to the library by custom-code and by features like mail merge and the advanced mail manager.

    The path to the document is built from a number of elements.

    You have the administrative settings that explain where Sage CRM can physically find the documents.

    See: Administration -> E-mail and Documents

    The documents and files are stored in subfolders. The subfolder names are based on the Company name - and here I am assuming that the documents are associated with the company - so does the company have any special characters in their name?

    Have percent signs been used in the file names?

  • 0

    Hi Jeff,

    We have Sage CRM 7.3. Most of the documents are the demo documents that came with the install. e.g. the Panoply quote documents etc.

    I've just clicked through all of the 23 templates. 14 of them produce the error, and the rest don't. As far as I can tell none of the files have % symbols in their name or file path (which I think is \CRM\Library\Global Templates\US ?).

    The documents are varied (the demos don't have owners, but some of ours do), they are varied file types, some are "draft" some are "final" some, they're all under "Sales" category, some are type "Quote" or "Order" or "Proposal"... There appears to be no pattern among the files that have the error and those that don't.

    Any ideas?

    The full text from the log is here which might be helpful:

    Jan 27 2016 8:17:00.865 12448 6316 1 UserActionException,ErrMsg Format '% ' invalid or incompatible with argument Jan 27 2016 8:17:00.865 12448 6316 1  : EConvertError: Format '% ' invalid or incompatible with argument
    Jan 27 2016 8:17:01.009 12448 6316 1 Creating stack-trace ID:3504130977. Error message is "Format '% ' invalid or incompatible with argument" Jan 27 2016 8:17:01.009 12448 6316 1 ---------------------------------------------------------------------------------------------------------- |Address |Module |Unit |Class |Procedure/Method |Line | ---------------------------------------------------------------------------------------------------------- |7743447B|KERNELBASE.dll| | |RegCloseKey | | |76DFD369|user32.dll | | |EnumDisplayMonitors | | |76A75528|OLEAUT32.dll | | |SysAllocStringLen | | |77430740|KERNELBASE.dll| | |LCMapStringEx | | |77430A55|KERNELBASE.dll| | |LCMapStringW | | |678A9EBE|MSDART.DLL | | |MpHeapAlloc | | |678A9EC9|MSDART.DLL | | |MpHeapAlloc | | |74E5B3A0|msvcrt.dll | | |memcpy | | |77689880|ntdll.dll | | |memcmp | | |77433A18|KERNELBASE.dll| | |FreeSid | | |678A1252|MSDART.DLL | | |mpFree | | |767839D0|KERNEL32.DLL | | |CompareStringA | | |1BFDC58A|eware.dll |Translate.pas |TTranslationFamily |GetTranslation |582[57] | |1BFDC996|eware.dll |Translate.pas |TTranslationList |GetTranslation |659[6] | |1BFDC920|eware.dll |Translate.pas |TTranslationList |GetTranslation |653[0] | |1BF96E72|eware.dll |WebObject.pas |TWebObject |GetTrans |3723[6] | |1BF96F55|eware.dll |WebObject.pas |TWebObject |GetTrans |3741[24] | |1BCE048C|eware.dll |WsLibrary.pas |TWebLibraryItem |GenerateQuickTemplateCheckbox|1783[33] | |1BCE0274|eware.dll |WsLibrary.pas |TWebLibraryItem |GenerateQuickTemplateCheckbox|1750[0] | |1BCE42E8|eware.dll |WsLibrary.pas |TWebLibraryItem |ShowInfo |2581[5] | |1BCE4270|eware.dll |WsLibrary.pas |TWebLibraryItem |ShowInfo |2576[0] | |1BCE2D7C|eware.dll |WsLibrary.pas |TWebEditLibraryItem |BuildGlobalItemScreen |2292[26] | |1BCE2C28|eware.dll |WsLibrary.pas |TWebEditLibraryItem |BuildGlobalItemScreen |2266[0] | |1BCE2843|eware.dll |WsLibrary.pas |TWebEditLibraryItem |BuildScreen |2207[3] | |1BCE2818|eware.dll |WsLibrary.pas |TWebEditLibraryItem |BuildScreen |2204[0] | |1BCE3B62|eware.dll |WsLibrary.pas |TWebEditLibraryItem |BuildContents |2464[79] | |1BF725BD|eware.dll |WebPage.pas |TWebPage |GetHtml |455[11] | |1BA6846B|eware.dll |WebFrameSet.pas |TWebFrameSet |GetHtml |685[221] | |1BA679EC|eware.dll |WebFrameSet.pas |TWebFrameSet |GetHtml |464[0] | |1BA65D25|eware.dll |WebFrameSet.pas |TWebFrameSet |GetHtml |110[4] | |1C0117D0|eware.dll |Dispatch.pas |TDispatcher |Action |3763[918]| |1C00E8A4|eware.dll |Dispatch.pas |TDispatcher |Action |2845[0] | |1C098F6F|eware.dll |ISAPIDispatch.pas|TISAPIEntry |ISAPIEntryAction |334[25] | |1C0559C3|eware.dll |HTTPApp.pas |TWebActionItem |GetMask |1244[19] | |1C0555F3|eware.dll |HTTPApp.pas |TWebActionItem |DispatchAction |1108[18] | |1C055500|eware.dll |HTTPApp.pas |TWebActionItem |DispatchAction |1090[0] | |1C05623F|eware.dll |HTTPApp.pas |TCustomWebDispatcher |DispatchAction |1488[15] | |1C0561B8|eware.dll |HTTPApp.pas |TCustomWebDispatcher |DispatchAction |1473[0] | |1C05647E|eware.dll |HTTPApp.pas |TCustomWebDispatcher |HandleRequest |1543[3] | |1C057E0D|eware.dll |HTTPApp.pas |TDefaultWebAppServices|InvokeDispatcher |2287[3] | |1C057DD0|eware.dll |HTTPApp.pas |TDefaultWebAppServices|InvokeDispatcher |2284[0] | |1C057DB0|eware.dll |HTTPApp.pas |TDefaultWebAppServices|HandleRequest |2268[1] | |1B8CEACD|eware.dll |WebReq.pas |TWebRequestHandler |HandleRequest |368[25] | |1B8CE99C|eware.dll |WebReq.pas |TWebRequestHandler |HandleRequest |343[0] | |1B8CF9F2|eware.dll |ISAPIApp.pas |TISAPIApplication |HttpExtensionProc |100[6] | |1B8CF998|eware.dll |ISAPIApp.pas |TISAPIApplication |HttpExtensionProc |94[0] | |1B8CFAF5|eware.dll |ISAPIApp.pas | |HttpExtensionProc |147[10] | |76777C02|KERNEL32.DLL | | |LoadResource | | ----------------------------------------------------------------------------------------------------------

  • 0

    We still have this error. Any suggestions?

  • 0

    The character % is actually the %. Have you any company names and documents with '%'

  • 0

    As far as I can tell the documents do not have any '%' characters in their names. For example the error happens with the demo document: "Print Order Template.docx" which is stored in a folder like "D:\Program Files (x86)\Sage\CRM\CRM\Library\Global Templates\US". I have done a search in the database for company names and believe that none of the company names have any '%' characters either. But I doubt this would affect it any way since I'm accessing the documents through the list at: Administration -> E-mail and Documents -> Document Templates

  • 0

    Hmmm.

    I wonder whether there is an issue with translations. Digging around on my laptop I found a note that reminded me that the message EConvertError: Format '% ' invalid or incompatible with argument" is associated with attempted output of variables. %s and %d are characters used internally within the eWare.dll for formatting strings (%d is replaced with a number, %s is replaced with another string). If stray spaces or other characters have been added to the translations associated with the listing of the files then that might be the origin of the error.

  • 0

    Hi Jeff,

    I just had the same error message in 7.3 SP2.1. Produced from the action of saving a new email template with table widths specified in percentages (50%). Converted them across to em's and I will see if that fills the email template area correctly when I get to the testing. This was using the ck editor for New Email Templates.

    Cheers.