Bug 66091 - Updating styles at a "Modified template" prompt deletes header text
Summary: Updating styles at a "Modified template" prompt deletes header text
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-23 16:25 UTC by David
Modified: 2013-06-24 13:38 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2013-06-23 16:25:52 UTC
STEPS TO PRODUCE:
1. You will need a document based on a defined template (File > New > Templates > [double-click desired template]). Let's call it "MyDoc", and activate headers and add some text. Save, close.

2. Make some changes (anyt change) to the template (perhaps while editing a different document based on the same template); changes could be trivial.

3. Re-open "MyDoc", and get presented with dialog:

[quote]
The template 'TEMPLATE NAME' on which this document is based, has been modified. Do you want to update style based formatting according to the modified template?
[Update Styles] [Keep Old Styles] [Help]
[/quote]

4. Click "Update Styles".

WHAT HAPPENS?
The header has been de-activated, and the text it contained is gone.

WHAT DID YOU EXPECT TO HAPPEN?
I expect "MyDoc" to have the new formatting/styles from the updated template, but WITH ALL TEXT/CONTENT INTACT.

ADDITIONAL INFO:
If you click "Help", the relevant bit says:

"To apply the new styles from the template to the document, click **Yes**."

There is no mention that *content* will be affected in any way.
Might be related to this bug: #52084

PLATFORM etc.:
LO: Version 4.0.3.3 (Build ID: 400m0(Build:3))
OS: Linux Mint 13/Xfce
Comment 1 Cor Nouws 2013-06-23 16:50:28 UTC
Hi David,
thanks for reporting and the clear description.

I tried to reproduce the behaviour in 403rc3 and 404rc2. 
But in both versions the header remained in tact
(I changed the formatting of a header style with your step#2).
So sorry that I cannot confirm.

I test on Ubuntu, but with the LibreOffice versions downloaded from the LibreOffice site (so not the ones proved by Ubuntu)

regards,
Cor
Comment 2 David 2013-06-23 17:02:00 UTC
Thanks for the quick response, Cor.

I just checked this again with a different template, and reproduced my "bug". 

What I did:
1. Created a document as in first step of my original post: multi-page (dumped in some text from Project Gutenberg :), set up a running header, turned OFF header on first page only by assigning a "first page" style to the first page > saved, closed.
2. Opened template for editing: moved the template name in "Properties" from title field to comment. Saved and closed.
3. Re-opened file from with Project Gutenberg text (a few pages of Charles Dickens' "Christmas Carol", in fact) - got the "Modified template" dialog, clicked on "Update styles", and...
4. ...running header gone on all pages.

For me this is very consistent. Those are a precise set of steps. Maybe it's "just me" but I hope not! (If you see what I mean.)
Comment 3 David 2013-06-23 17:10:50 UTC
P.S. I don't know if it's relevant, but I get my LibreOffice from this PPA:

https://launchpad.net/~libreoffice/+archive/libreoffice-4-0
Comment 4 Cor Nouws 2013-06-23 17:58:19 UTC
Hi David,

(In reply to comment #2)

> What I did:
> [....]

Hmm, that is not the same as what you wrote first.
Still, I cannot reproduce.

> P.S. I don't know if it's relevant, but I get my LibreOffice from this PPA:

Might well be?

Best,
Cor
Comment 5 David 2013-06-23 18:55:22 UTC
(In reply to comment #4)
> 
> (In reply to comment #2)
> 
> > What I did:
> > [....]
> 
> Hmm, that is not the same as what you wrote first.

Hi Cor - just more detailed, isn't it? I wasn't sure how precise to be in the initial report. (Lesson I've learned: be *very* specific! :)

> Still, I cannot reproduce.

Hmm... I guess we see if anyone else can reproduce? Obviously not a "killer" problem. I think I'll link this on AskLibO and see what we get there.

Thanks for your help!
Comment 6 Cor Nouws 2013-06-23 18:59:27 UTC
(In reply to comment #5)

> Hi Cor - just more detailed, isn't it? I wasn't sure how precise to be in
> the initial report. (Lesson I've learned: be *very* specific! :)

Yes, that is fine.
And the other way round: maybe you can try if it behaves fine if you try a simple test: one page, one header + some text, and change just font heading1 or so.

> Hmm... I guess we see if anyone else can reproduce? Obviously not a "killer"
> problem. I think I'll link this on AskLibO and see what we get there.

Good idea.

> Thanks for your help!

You're welcome!
Comment 7 David 2013-06-23 19:27:42 UTC
(In reply to comment #6)
>
> And the other way round: maybe you can try if it behaves fine if you try a
> simple test: one page, one header + some text, and change just font heading1
> or so.

I took your advice and tried this. All I chaned in the template was the "Source Text" character style (font from "Droid Sans" to "Consolas"). I still lost the header. =/

> > ... I think I'll link this on AskLibO and see what we get there.
> 
> Good idea.

I've put a "question" up with a link to this bug report:

http://ask.libreoffice.org/en/question/19479/modified-template-gives-update-styles-dialog/
Comment 8 David 2013-06-24 07:31:28 UTC
I got some very helpful (and typically helpful, I might add!) help from "oweng" at AskLibO:

http://ask.libreoffice.org/en/question/19479/modified-template-gives-update-styles-dialog/?answer=19484#post-id-19484

Please see his post for fuller information on workflow, etc.

MY SUMMARY OF THE SITUATION:

1. Essentially MY problem (at the moment) is a workflow/documentation problem. I had NOT set a "page style" which would retain the header/footer information for the document. Oweng's steps nicely describe what is needed to ensure that header/footer information survives template modification.

2. For header/footer information to survive template modification, on needs a PAGE STYLE that has header/footer ENABLED, and uses FIELDS ONLY for the information to be displayed (in Writer, Insert > Fields > Date | Time | P Num | P Count | etc.). By doing this, the headers/footers remain intact when the template is modified.

3. BUT (!!!) that is the ONLY way (so far as I can work out) for header/footer information to remain intact when a template is modified. If there is any "custom" or "user input" text in the header/footer, it WILL STILL DISAPPEAR when the template is modified.

4. I have checked this as carefully as I can. I'm not infallible, so would still be interested if there is any confirmation of (3.) above in particular.

COMMENTARY:

1. This is reasonable, and it is good to have Oweng's steps as documentation in AskLibO. In my own case, it has resolved the issue, as my "Body Page" style (which follows "First Page" style) now has a header with the "Title" field, with "Page Number/Count" fields. This is SAFE and remains INTACT. Yay! (Thanks, Oweng.) This is why I have marked this "bug" report as RESOLVED > NOTABUG.

2. However, this strikes me as counter-intuitive. NO OTHER USER-INPUT TEXT, e.g., like the rest of the document!, goes missing when a style (any style) is modified in a template. If I change a style, my "Quotations" paragraphs don't all of a sudden disappear. It is very strange to me that headers/footers should be any different. These are "content" areas of a specialized kind, but "content areas" all the same.

3. If my previous comment in 2. makes sense, then should this be filed as an "enhancement request"?
Comment 9 Cor Nouws 2013-06-24 13:00:15 UTC
Hi David,

(In reply to comment #8)
> I got some very helpful (and typically helpful, I might add!) help from
> "oweng" at AskLibO:

Ah great that there are people out there giving such thougoughful support too.

> 3. BUT (!!!) that is the ONLY way (so far as I can work out) for
> header/footer information to remain intact when a template is modified. If
> there is any "custom" or "user input" text in the header/footer, it WILL
> STILL DISAPPEAR when the template is modified.

Sorry that I cannot reproduce this. In all my tests, I've just added some text and no field at the header.

Thanks for reporting back!
Cor
Comment 10 David 2013-06-24 13:38:13 UTC
(In reply to comment #9)
> 
> > 3. BUT (!!!) that is the ONLY way (so far as I can work out) for
> > header/footer information to remain intact when a template is modified. If
> > there is any "custom" or "user input" text in the header/footer, it WILL
> > STILL DISAPPEAR when the template is modified.
> 
> Sorry that I cannot reproduce this. In all my tests, I've just added some
> text and no field at the header.

Thanks for confirmation, Cor. It may well just "be me".

I'm about to do some travel that means limited/no access to computing/network, but I'll follow this up on other platforms on my return. Thanks for your your responsiveness in the meanwhile.