Styles modified in template, style update pop-up in document coming twice

Version: 24.8.6.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 2; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-US (en_US.utf8); UI: en-US
24.8.6-1
Calc: threaded

.odt and .ott in use
.ott used only for styles definitions (paragraph and character), no document content in template.
Styles are managed only in template.
I use Styles Spotlight when some problems arise with styles or with document, I use it to check
if the styles usage is as author expects it.

It is x-th week in sequence as the the use of Reload (File menu) in document open results in double-query to update styles. Before Reload one style was modified in template, it is a style which is used in .odt reloaded. In end-effect user needs to accept styles update in document twice every time such document reload is triggered by user. I guess that document closing and reopening will present same results, however no tests were made this manner.
What are possible reasons of style-update query to pop-up twice?

I experienced this double query, but I kind of think I was in a more complex context, something like template+master+sub docs. I checked it has no adverse effects and accepted it as a transient hiccup.

It may originate in having both the template and the document open simultaneously (use of File>Reload).

Thanks for hint. This is what for sure applies in this case here locally - template and derived document are open at the same time. Otherwise the handling gets bit more cumbersome. Fortunately really cheap to check in a retest. Though can’t do it immediately. Will conduct retest and report as soon as possible.

If you create a new document based on a template and keep You save that document as a template overwriting the original template

Template exists, is open because sometimes style get modified.
Each single style modification is saved to file - Save while template file open.
Then going back to derived document which is also open, ensuring that all former document modifications are saved to file. Finally Reload in open document.
I did’t get how your statement maps to this proceeding.

You can overwrite the original template (saving the document based on the template whit the same name and extension as the original template )

I see. Thanks. Yeah, it can well be that this happened once in the past. Sure is, I can’t exclude it to had happened.

I never create such a loop but I experienced the issue. I double check on next occasion and report here.

Following observation was made recently. 8 days ago decided to rename one custom style (CS) - the desire was to make it visible in style name it is a style created for current project. Modifying name of existing CS was risky - Writer had would eventually dropped the style from all paragraphs using it, subsequently hard to re-find these. Hence, the plan for proceeding got set: create same CS but again based on No Character Style, make it identical to CS to be renamed, assign the desired name, save it to template in use, start the usage of new CS in derived documents, at a free minute switch the CS usage from old custom CS to the new one, remove old custom CS as soon as one is sure no document/ no paragraph is using it any more. Procedure almost completed except for recent step. So far re-opening two derived documents was accompanied by one-single prompt “style has been modified in underpinning template, do you like to take it over in current document?”, presented prompt message is my paraphrasing.

So, what is the question?

Renaming a style in a usual text document works fine because Writer has everything at hand: the existing style and its references. Changing the name takes immediate effect with expected results.

Renaming a style in a template to forward it to documents is more hazardous because comparison between template and docs is base on name. You can change it in the template with correct results inside the template. But, when you open a document, you get indeed the “styles modified” dialog, but the document is unable to guess the relation between the “old” name (present in the document) and the “nex” name (provided by the template). You end up with both the “old” and “new” styles in the document.

Unfortunately, Edit>Find & Replace has no tool to play with character styles (while it has for paragraph styles). So there is no UI to fix the issue.

If you are brave enough (and careful to work on a copy), you can save your document as .fodt and change the old name to the new name in the XML (pay special attention to spaces or other non-alphanumerical characters in the name which are hexa-encoded). When done, reopen the .fodt in Writer and accept the style changes. It should work. Note that it is preferable to do the change before updating the styles.

No question, just reporting the observation made - apropos possible reasons of behavior under discussion here. Hadn’t time so far to retest saving document back to template file it got derived from once - a kind of loop.

This is what I meant with be risky.