Writer template documents contain styles and default text content, which help maintain a consistent look across documents. When styles are modified in the template, the dependent documents can be updated when they are next opened.
The dialog which pops up asks if styles should be updated. From this wording, user expects only the styles to be changed, not text content.
This is what happens, but for header/footer styles. If Header x and Footer x (predefined or hierarchically dependent) is changed, contents of the header/footer paragraphs which reference this style either directly or through a chain of dependencies are wiped out. This is not consistent with what happens to body text paragraph.
LO Writer Guide does not mention this strange behaviour, which was discovered from experiments trying to address this question.
Is this the intended behaviour from the developers’ point of view or a bug?
In the first case, it should be mentioned somewhere as a caveat.
EDIT 2016-04-24
This is how I understand current behaviour. Please correct me if my assumptions are wrong.
Header/footer area belongs in the page format and are therefore controlled by page style. Since header/footer contents are repeated on every physical page, header/footer components (text, frames, tables, …) are stored with the page style. This assumption could explain why two independent non-connected (topologically speaking) parts of a document using the same page style cannot have different header/footer titles.
I do not understand why modifying Header or Footer paragraph styles should have an impact on page style: Header and Footer styles are certainly special since they are not “called for” in the page style definition dialog; they are implicitly referenced by the process handling the header/footer, though they can also be used in the main body text for their visual effect. The only style customisation is the drop-down menu in the Page
tab for Left & Right, Mirror Pages, Left only or Right only which will cause different variants of Header and Footer styles to be used for this page.
Managing headers and footers is surely a difficult task (from the developer’s point of view) since it breaks data flow: main body must be interrupted temporarily to build these areas and then be restarted as transparently as possible. But I do not see the necessity to consider header/footer contents as style side-property.
In a template, text (or more generally typographical items) written in the main body flow is not part of any style and, consequently, is used only on initial reference to the template. Even if template styles are modified or template main body text changed, the document main body text will not be updated, erased, merged or replaced in any way with the new template text.
There are cases where this is desirable but that would complicate LO going a lot beyond the base
principles (among other features, this requires splitting text both in the template and the document into
corresponding “sections” and marking them as “will override”, “don’t care”, “don’t override”, …) This is too
much pain for rare uses.
Clearly, header/footer contents should be managed under the same rules as main body text: it is perfectly normal that template header contents provide the initial titling of a document, but once this titling has been set to document needs it should not be changed by template update. Of course, a change in Header or Footer paragraph style must be reflected in the document for its visual aspects after template styles update without causing loss of work.