Something fishy in ODT templates

Hello everyone!

I just can’t wrap my head around what could be the issue with our custom templates.
We’ve tried pretty much everything that we can think of:

Templates made by others; works fine.
Template that came with Dolibarr; works fine.

Our template gives the following:

Dolibarr has detected a technical error.
This is information that can help diagnostic:
Date: 20141219010313
Dolibarr: 3.6.1
Level of features: 0
PHP: 5.5.12-2ubuntu4.1
Server: Apache/2.4.10 (Ubuntu)

Requested Url: /dolibarr/comm/propal.php?id=1
Referer: http://localhost/dolibarr/comm/propal.php?id=1
Menu manager: eldy_menu.php

Database type manager: mysqli
Request for last database access in error: No request in error
Return code for last database access in error: No request in error
Information for last database access in error: No request in error

Message: propal_pdf_create Error: ‘lines’ segment not found in the document
Dolibarr has detected a technical error.
This is information that can help diagnostic:
Date: 20141219010313
Dolibarr: 3.6.1
Level of features: 0
PHP: 5.5.12-2ubuntu4.1
Server: Apache/2.4.10 (Ubuntu)

Requested Url: /dolibarr/comm/propal.php?id=1
Referer: http://localhost/dolibarr/comm/propal.php?id=1
Menu manager: eldy_menu.php

Database type manager: mysqli
Request for last database access in error: No request in error
Return code for last database access in error: No request in error
Information for last database access in error: No request in error

Message: ErrorBadValueForParamNotAString

Even if we just place {company_name} on a blank LibreOffice Writer 4.3.3.2, name it - save it to the right folder, always get that error mentioned above. What could be the issue?

Try not to create a new ODT file but changing a copy of a working one.

Had the same problem and this worked everything out.

Tried even that, and I did manage to get a random letter k to the invoice, but as soon as one tried to edit the company logo, translate a piece of text or edit the { … } it went bonkers.

Anyways, merry cristmas to everyone.

hello, don’t use backspaces, preferwriting, not pasting etc… there is a link in the wiki with recommandation on ODT fields :happy:

good luck and merry Xmas too

Yep, no backspasing, no copy/cut-pasting, but still not working. Tried Gedit, Notepad, OpenOffice, LibreOffice, Winblows based and Linux based OS/programs and still nothing. Wondering if there’s some sort of bug in the Dolibarr version that I have installed.

Well holy cr**! Got it working!

If someone else is having the same difficulties:
- Open the .odt file with a packet/archive manager (it’s basicly like a .zip file)
- Check the file “content.xml” (it’s immediately in the root)
- Search for the “[!-- BEGIN…”

Notice the two lines in the end of it (–).
Somehow it can get srewd up in a way that those two lines become one long line. That corrupted the file in our case.
When changed to “–”, everything worked out excellent!

Ps. propably the versions tried with Notepad, Gedit etc. “normal” text editors didn’t work because there wasn’t any [!-- BEGIN…] at all, just ie. {mycompany_name} or something like that. So it also definetly needs that BEGIN list thingie.

Actually, someone might want to update the wiki for odt templates to let people know to watch out for this.