Bug 85917 - User is prompted for Input Fields in header/footer of page styles not actively used in document - should be skipped
Summary: User is prompted for Input Fields in header/footer of page styles not activel...
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fields
  Show dependency treegraph
 
Reported: 2014-11-05 13:30 UTC by Charles
Modified: 2022-05-05 06:36 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Input Fields - NOT Double-Prompted (7.46 KB, application/vnd.oasis.opendocument.text)
2014-11-05 13:30 UTC, Charles
Details
Input Fields - Double Prompted (7.59 KB, application/vnd.oasis.opendocument.text)
2014-11-05 13:30 UTC, Charles
Details
Input Fields deleted - no longer double-prompted, but still single-prompted (7.15 KB, application/vnd.oasis.opendocument.text)
2014-11-05 13:32 UTC, Charles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles 2014-11-05 13:30:13 UTC
Created attachment 108953 [details]
Input Fields - NOT Double-Prompted

Note: I'm opening this bug based on the one I opened for Openoffice long ago (just over 8 years ago in fact) - and it still exists...

This is a strange one...

The issue is, once the bug is triggered, whenever you initiate the prompt for Input Fields (either using 'CTRL+SHIFT+F9' or when dbl-clicking on a template),it prompts for all of the fields, then prompts for all of the same ones *again* - so, it prompts for all of the fields *twice*.

Interestingly, deleting ALL of the Input Fields from both the Header and Footer results in all of the Fields *still being prompted for*, even though there are none there, but this time they are only prompted for once.

What I did to reproduce it was:

1. Modify the 'Default' Page Style of the newly created document to contain
Headers and Footers, then place Input Fields into them. Save it.

2. Create a new Page Style based on the 'Default' (which should be the current
selection) by using the 'New Style from Selection' option in 'Styles and
Formatting' > 'Page Styles'.

3. Apply the newly created Style by dbl-clicking it.

4. Initiate the prompt for Input Fields ('CTRL+SHIFT+F9').

5. You should be dbl-prompted for the fields.

NOTE: this bug does *not* trigger (at least it didn't for me) if you create the
Page Styles you want to use and apply them *before* you add the Input Fields to
the Header/Footer.

In other words, it should be reproducible by simply copying the 'Default' page
style to a custom one, then changing the current Page Style to the newly created
custom one.

I will attach three sample documents (templates are affected the same way), one
that doesn't exhibit the bug (before I changed the Page Styles), one that does
exhibit the bug (*after* I changed the Page Styles), and one that I deleted all of the Input Fields from *after* the bug was triggered, which still prompts for all of the Input Fields, but this time only once.

I have not been able to 'fix' a document once the bug is triggered. In fact,
deleting *everything* in a broken document results in *all* of the Input Fields that were there being prompted for, but only once.
Comment 1 Charles 2014-11-05 13:30:59 UTC
Created attachment 108954 [details]
Input Fields - Double Prompted
Comment 2 Charles 2014-11-05 13:32:05 UTC
Created attachment 108956 [details]
Input Fields deleted - no longer double-prompted, but still single-prompted
Comment 3 Buovjaga 2014-11-16 11:05:08 UTC
Reproduced. Tried all 3 files.

Win 7 64-bit Version: 4.4.0.0.alpha2+
Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08
Comment 4 Gordo 2015-06-27 16:42:42 UTC
Content in headers and footers are saved with the page style.

Default Style has header and footer with input fields.
A new style is created from Default Style.
Page is changed to new style.
Default Style, even though it is not used, still has input fields.

Maybe there should be a check when updating fields to see if a page style is used in the document.

The workaround is to insert a page break with any unused page styles and delete the input fields from the headers and footers then delete the page break.

Windows Vista 64
Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Comment 5 QA Administrators 2016-09-20 10:10:12 UTC Comment hidden (obsolete)
Comment 6 Cor Nouws 2019-06-26 14:12:47 UTC
(In reply to Gordo from comment #4)
> Content in headers and footers are saved with the page style.
> 
> Default Style has header and footer with input fields.
> A new style is created from Default Style.
> Page is changed to new style.
> Default Style, even though it is not used, still has input fields.
> 
> Maybe there should be a check when updating fields to see if a page style is
> used in the document.
> 
> The workaround is to insert a page break with any unused page styles and
> delete the input fields from the headers and footers then delete the page
> break.
> 
> Windows Vista 64
> Version: 4.4.4.3
> Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
That is the proper analyses.

So let me change this to a RFE and change the summary accordingly.
Comment 7 Mike Kaganski 2022-05-05 06:25:58 UTC
I'm unsure this is a valid request. The headers/footers are all equal, and are outside of the text flow. The "use" of any page style is something happening dynamically, e.g. if the styles participate in "next style" sequence, it may be used on one system (with some fonts installed), but not on another (with those fonts missing, and substituted fonts making the page count to be a bit smaller). But at some edit, those pages may appear after typing some more text ... and what then? What value should be displayed there, if wasn't set on document creation?

IMO -> WF or NOTABUG.