Bug Hunting Session
Bug 93421 - EDITING, FORMATTING: template changes do not propagate to existing documents when template is imported in newer version of LibreOffice [works for me]
Summary: EDITING, FORMATTING: template changes do not propagate to existing documents ...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.1.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-14 06:48 UTC by Jan Bart
Modified: 2017-08-15 11:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
original template working properly in LO 4.0.5 (1.50 MB, application/vnd.oasis.opendocument.text-template)
2015-08-14 06:48 UTC, Jan Bart
Details
document created and updated styles in LO4.0.5 (969.53 KB, application/vnd.oasis.opendocument.text)
2015-09-07 12:02 UTC, Jan Bart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Bart 2015-08-14 06:48:10 UTC
Created attachment 117912 [details]
original template working properly in LO 4.0.5

I have a set of documents based on the same template, all created and maintained in 4.0.5.

Upgrade LO to any higher value causes issues. Some were fixed in 4.3.1 (see http://en.libreofficeforum.org/node/6674), but we still have the following issues:

A change in the template made in LO 4.4.1 (both Win7 & Xubuntu 14.04) or LO 5.0.0 portable (win7) or LO 5.0.0 (Xubuntu 14.04) does not propagate to existing documents. In other words, I do not get the message “Styles have been changed, you do want to update?”, even though the template has changed.

The same template-change performed in LO 4.0.5 (both win7 & xubuntu 14.04) does work properly.

A new document based on a modified 4.4.1 (or above) template, does also not propagate any later change in the template.
Comment 1 Buovjaga 2015-09-05 17:21:32 UTC
Are you sure you have defined the path to the template correctly in Tools - Options - LibreOffice - Paths?
I tested with your template and when I changed it and opened a previously created document, it asked if I wanted to update styles and it worked ok.

Win 7 Pro 64-bit, Version: 5.0.1.2 (32-bit)
Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261
Locale: fi-FI (fi_FI)
Comment 2 Jan Bart 2015-09-07 11:50:46 UTC
yes I am sure the path to the template is correct.

The point is, that a document created in LO 4.0.5 does not get the "Update styles" message, when I change the (imported from 4.0.5)template in LO5.

Documents newly created in LO5 and based on the template do link to the template-styles, I have seen that.
Comment 3 Buovjaga 2015-09-07 11:54:34 UTC
I guess you have to attach the document here, then.
Comment 4 Jan Bart 2015-09-07 12:02:54 UTC
Created attachment 118496 [details]
document created and updated styles in LO4.0.5

If I change the (previously attached) template in LO5, to which this document was linked when created in LO4.0.5, and when this document is opened in LO5, I do not get the "updated styles" dialog.
Comment 5 Buovjaga 2015-09-08 09:25:07 UTC
(In reply to Jan Bart from comment #4)
> Created attachment 118496 [details]
> document created and updated styles in LO4.0.5
> 
> If I change the (previously attached) template in LO5, to which this
> document was linked when created in LO4.0.5, and when this document is
> opened in LO5, I do not get the "updated styles" dialog.

Yes, it's true that it didn't ask to update, even though I have a modified TempressManuals template in my templates folder.

Win 7 Pro 64-bit, Version: 5.0.1.2 (32-bit)
Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261
Locale: fi-FI (fi_FI)
Comment 6 Cor Nouws 2015-09-14 12:58:49 UTC
Note that bug 52084 was closed because of lack of information
Comment 7 Jan Bart 2015-09-14 13:45:18 UTC
Does that mean you need more information?
I am happy to supply more detailed information if needed...
Comment 8 Buovjaga 2015-09-14 14:00:12 UTC
(In reply to Jan Bart from comment #7)
> Does that mean you need more information?
> I am happy to supply more detailed information if needed...

Well I sure don't need anything more as I was able to reproduce the problem :)
Comment 9 Cor Nouws 2015-09-25 10:41:02 UTC
Recently doing some tests with either daily or 5.0.2.2
Anyway, updating styles still works for me..

Could it maybe be that in your situation the location (path) of the template was changed?
Comment 10 Jan Bart 2015-09-25 11:43:50 UTC
see comment #2.
I will test 5.0.2 and provide feedback.
Comment 11 Cor Nouws 2015-09-25 12:01:05 UTC
(In reply to Jan Bart from comment #10)
> see comment #2.
> I will test 5.0.2 and provide feedback.

Maybe Tools > Options > Load/Save > General .. relative paths has influence on this? Never checked that.
But the link of the template can be absolute, including the path. So if the initial template has a path to the 4.x installation and now is on the 5.x path, that would explain it.
Comment 12 Jan Bart 2015-09-25 13:56:05 UTC
tested LO5.0.2 on Xubuntu, double-checked the path to the template. 
Same result as in #2. It should tell you Updated styles are available, but is does not.

When you test, did you change the template in 5.0.2.2, and then open the attached 4.0.5 document of #4?

We have several hundreds of documents created in 4.0.5 and I'd dread the task of having to recreate these in LO5.
Comment 13 Cor Nouws 2016-05-28 12:50:50 UTC
Hi Jan Bart,

So... this took some time, apologies.
(Cleaning up some tabs in the browser currently..)

What I did
- Create template in 4.0.6.2
- Make document with that
- Import and Change template in 5.1.3.2
- Open document from 4.0.6.2 in 5.1.3.2
 > did not ask for updating
   (according to your description)

- Started 4.0.6.2 again and changed template and opened file.
 > Indeed asked for updating

- Started 5.1.3.2 again and opened file from 4.0.6.2 again.
 > Now it does ask for updating..
So restarting seems to solve the problem.
Anyway, in my situation with Ubuntu 32 bits and the mentioned versions.

Can you please update what is the situation for you?
thanks - Cor
Comment 14 janbart 2016-05-30 21:32:51 UTC
Hi Cor,
Sorry to report that I still have this reported issue.
When you tested, how did you separate the LO4 and LO5 template-paths?
And did you test 4.0.6.2 or 4.0.5.2? We are using 4.0.5.2.

I tried earlier in Xubuntu but when I change the template path for LO4, I automatically change the path for LO% too. And I do not want to mix these templates, was afraid the conversion from 4 to 5 would render the template useless in 4.

I tried again today in Win7 x64, with LO4.0.5.2 and the portable-apps 5.1.1.
I did import the 4.0.5 template in LO5, and opened a 4.0.5 document that for sure gave me the dialogue in LO4. Opened in LO5, no luck. Closed, re-opened in 4.0.5, got the dialogue. Closed, reopened in LO5. Still no luck, I could not get the Update styles dialogue.
Comment 15 Cor Nouws 2016-05-30 22:08:03 UTC
Hi Jan-Bart,

(In reply to janbart from comment #14)

> Sorry to report that I still have this reported issue.

Esp sorry for you :\

> When you tested, how did you separate the LO4 and LO5 template-paths?
> And did you test 4.0.6.2 or 4.0.5.2? We are using 4.0.5.2.

I created a template in 4.0.6.2 and copied it from my 406rc2/user/template to the 513rc2/user/template path

I have little reason to expect that it's different with 4052... but..
Comment 16 Cor Nouws 2016-05-31 07:42:30 UTC
(In reply to Buovjaga from comment #5)

> Yes, it's true that it didn't ask to update, even though I have a modified
> TempressManuals template in my templates folder.

What steps did you exactly make to reproduce this :) ?
Comment 17 Buovjaga 2016-05-31 08:54:37 UTC
(In reply to Cor Nouws from comment #16)
> What steps did you exactly make to reproduce this :) ?

It's been almost a year, so I don't remember.
Comment 18 Cor Nouws 2016-06-03 15:55:30 UTC
So ...

(In reply to Cor Nouws from comment #13)

> - Started 4.0.6.2 again and changed template and opened file.
>  > Indeed asked for updating
> 
> - Started 5.1.3.2 again and opened file from 4.0.6.2 again.
>  > Now it does ask for updating..
> So restarting seems to solve the problem.

Nope. It was the template in the 4.0.6.2 installation that still was referred in the document, that made the question appear. 
Sorry for the confusion.

Now, when working in 5.1.3.2, changing the linked template from a document created in 4.0.5.2 to the 5.1.3 path, does not make the update-question being triggered after changing the linked template in 5.1.3.2.
Doing the same with a file from 4.0.6.2, doe trigger the update-question.

So there lies probably the problem, that needs to be looked at in more detail.
Comment 19 Jan Bart 2017-03-07 10:28:32 UTC
It has been a while, and I found what I think is the cause of my confusion.

The path of the linked template in the meta.xml is hardcoded in documents created in 4.0.5, like c:/users/user1/..
But the path of the linked template is relative in documents created in 5.x., like ../../../../

Opening and saving a LO4 document with LO5 keeps the hardcoded path of the linked template, it does not convert that to a relative path.
Since I was randomly picking subdocuments for testing, that were created by several of my colleagues (user1, user2, user3), the converted document would still refer to the template on the harddisk of my colleagues computer...no wonder it would not ask "Update styles?".

Creating a new LO5 document does store the relative path to the linked template of LO5, and that document worked like a charm.

Using the template changer 1.2.7 found elsewhere wisely, and assigning LO5.3 to use that same new template, our hundreds of master and subdocuments are easily converted and all seems to work as intended.

Thank you for your efforts.
Comment 20 Buovjaga 2017-03-07 10:43:51 UTC
For reference, latest version of Template Changer is 1.2.7d: https://bugs.documentfoundation.org/show_bug.cgi?id=60592#c16
It is still not updated to the website: https://extensions.libreoffice.org/extensions/template-changer

Jan: do you think we should close this as WORKSFORME?
Comment 21 Jan Bart 2017-03-07 13:25:01 UTC
sure, because it does indeed work for me.
Comment 22 Cor Nouws 2017-08-15 11:07:10 UTC
thanks for testing and reporting back, Jan!