[Solved] Template Reset

Using them, Making them, Finding them
Post Reply
WaltP
Posts: 40
Joined: Tue May 06, 2008 7:45 am

[Solved] Template Reset

Post 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...
Last edited by Hagar Delest on Mon Jan 21, 2013 10:41 am, edited 1 time in total.
Reason: tagged [Solved].
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Template Reset

Post 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.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Template Reset

Post 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.
AOO4/LO5 • Linux • Fedora 23
WaltP
Posts: 40
Joined: Tue May 06, 2008 7:45 am

Re: Template Reset

Post 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.
WaltP
Posts: 40
Joined: Tue May 06, 2008 7:45 am

Re: Template Reset

Post 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.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Template Reset

Post 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.
AOO4/LO5 • Linux • Fedora 23
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Template Reset

Post 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
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Template Reset

Post 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.
AOO 4.1.14 on Ubuntu MATE 22.04
Post Reply