Page 1 of 1

[Solved] Template Reset

Posted: Fri Jan 18, 2013 11:15 am
by WaltP
I did a bad thing...
I updated a template that I should not have updated. Should have made a new one.

Now I get the message
"The template 'Name' on which this document is based, has been modified..."
Is there any way to restore the original template since OO obviously remembers it?

Thanks...

Re: Template Reset

Posted: Fri Jan 18, 2013 11:55 am
by Bill
What is your operating system? Do you have a backup copy of the template? OOo/AOO doesn't remember the template. The modified date of the template is stored in each document based on the template. That's what OOo/AOO uses to determine if a template has been modified.

Re: Template Reset

Posted: Fri Jan 18, 2013 4:26 pm
by acknak
As far as I know, if you simply replace the template file with a version of the template file from before you changed it (that would be the backup copy Bill asked about), then you can safely allow OOo to "update" the document when asked: Writer will update the document(s) with the same data they had before and everything will be back to normal.

If you want to avoid the prompt altogether, then you have to either reset the template info (timestamp) stored in the documents, or replace the template file and then change it's modification time so that Writer thinks it's not recently changed.

Also, whether you need to do anything at all depends on what kind of modification you made to the template. If you only changed content in the template (text/graphics/direct formatting), then the prompted document updates won't actually change anything. The update only updates changes in the document's styles--formatting and the like--not it's content.

Re: Template Reset

Posted: Mon Jan 21, 2013 5:36 am
by WaltP
Bill wrote:What is your operating system? Do you have a backup copy of the template?
If I had a backup copy, I'd simply replace it...
Bill wrote:OOo/AOO doesn't remember the template. The modified date of the template is stored in each document based on the template. That's what OOo/AOO uses to determine if a template has been modified.
Bummer. Wish I knew what I changed...
acknak wrote:If you want to avoid the prompt altogether, then you have to either reset the template info (timestamp) stored in the documents, or replace the template file and then change it's modification time so that Writer thinks it's not recently changed.
I'll try changing the timestamp of the template itself.

Re: Template Reset

Posted: Mon Jan 21, 2013 7:58 am
by WaltP
Nope, didn't work.

What did work, though, was looking through the document (using a binary editor) and finding where the template is specified and changing the name to a non-existent template.

Re: Template Reset

Posted: Mon Jan 21, 2013 11:50 am
by acknak
WaltP wrote:Nope, didn't work.
Sorry--I was wrong about the file date. I forgot that OOo actually works from the "last modified" date stored in the template document, not from the file date. You'd have to edit the date stored inside the file.
What did work, though, was ... changing the name to a non-existent template.
If you just want to sever the link to the template, just answer "no" to the update prompt: the link to the template is disabled and Writer will never try to update it again.

There is also an extension available that allows you to manually set the template link to whatever template file you choose. "Template Changer" or something like that.

Re: Template Reset

Posted: Mon Jan 21, 2013 11:57 am
by RoryOF
acknak wrote:[There is also an extension available that allows you to manually set the template link to whatever template file you choose. "Template Changer" or something like that.
At Template Changer

Re: Template Reset

Posted: Mon Jan 21, 2013 5:03 pm
by Bill
WaltP wrote:
Bill wrote:What is your operating system? Do you have a backup copy of the template?
If I had a backup copy, I'd simply replace it...
Depending on your operating system, you might be able to recover the old version of your template.