[Solved] Template Reset

Using them, Making them , Finding them

[Solved] Template Reset

Postby WaltP » Fri Jan 18, 2013 11:15 am

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

Re: Template Reset

Postby Bill » Fri Jan 18, 2013 11:55 am

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.
Bill
Volunteer
 
Posts: 8160
Joined: Sat Nov 24, 2007 6:48 am

Re: Template Reset

Postby acknak » Fri Jan 18, 2013 4:26 pm

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

Re: Template Reset

Postby WaltP » Mon Jan 21, 2013 5:36 am

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

Postby WaltP » Mon Jan 21, 2013 7:58 am

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

Re: Template Reset

Postby acknak » Mon Jan 21, 2013 11:50 am

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

Re: Template Reset

Postby RoryOF » Mon Jan 21, 2013 11:57 am

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.9 on Xubuntu 20.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 32354
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Template Reset

Postby Bill » Mon Jan 21, 2013 5:03 pm

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.9 on Ubuntu MATE 20.04
Bill
Volunteer
 
Posts: 8160
Joined: Sat Nov 24, 2007 6:48 am


Return to Templates

Who is online

Users browsing this forum: No registered users and 5 guests