Bug 94612 - [HELPAUTHORING] it leaves empty ID when editing the document
Summary: [HELPAUTHORING] it leaves empty ID when editing the document
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: HelpAuthoring-Extension
  Show dependency treegraph
 
Reported: 2015-09-29 12:35 UTC by tagezi
Modified: 2018-07-28 11:31 UTC (History)
3 users (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 tagezi 2015-09-29 12:35:02 UTC
I can not restore the chain of events. But I submitted a patch [1] that shows that the  HelpAutoring 1.3 may leave blank ID tags. Most likely it happened when I edited the document and not at the time of its creation.

https://gerrit.libreoffice.org/#/c/18821/1/source/text/scalc/01/fun_aggregate.xhp
Comment 1 Yousuf Philips (jay) (retired) 2015-09-30 22:28:08 UTC
Yes i see an id="" on line 455, but also notice that a number of paragraph ids in the document dont seem to be created by the authoring tool, so i'm not sure what to think.

Can you please let me know which version of the authoring tool you are using because there isnt any 1.3 version. The latest version is 3.1.2.
Comment 2 Regina Henschel 2015-10-04 23:08:05 UTC
I see cases, where id="" happens. When a paragraph has no id, then it will get id="" on opening. Then it has an id and the macros do not detect, that the attribute is empty.

I see several ways to solve it, perhaps combine them:
(1) Correct the missing id attributes in all help files. Would that launch translations?
(2) Correct the mistake on import by generating an id in xmlhelp2soffice.xsl
(3) Use the "on load" event and the macro CheckOnLoad to correct the missing value in the id attribute.
(4) Check the IDs on save and correct an empty value then.

What do you think, what ansatz to use?
Comment 3 Yousuf Philips (jay) (retired) 2015-10-05 11:01:47 UTC
(In reply to Regina Henschel from comment #2)
> I see several ways to solve it, perhaps combine them:
> (1) Correct the missing id attributes in all help files. Would that launch
> translations?

If there is a means of fixing all these in one swoop, that would be the most ideal, assuming the authoring tool isnt pushing out any empty ids.

> (2) Correct the mistake on import by generating an id in xmlhelp2soffice.xsl

The next best thing.

> (3) Use the "on load" event and the macro CheckOnLoad to correct the missing
> value in the id attribute.

Doing it there would cause undos to appear when loading a page and if you dont edit the page, it would ask to save changes which would be annoying.

> (4) Check the IDs on save and correct an empty value then.

As good as option 2. Would prefer to use this option over 2 though, so that we could also add to the routine to check for duplicates, as lera has found help files with duplicates.
Comment 4 Regina Henschel 2015-10-05 16:43:24 UTC
In my proposed patch https://gerrit.libreoffice.org/19166 for bug #93981 I add an id, if it is missing at all in the file or if it has an empty value. That is the way (2).

It is still useful to make sure that the id values are correct, when saving the file. The user might have tried to enter values manually. So way (4) is still necessary. Doing it in the macro and not in the export filter has the advantage, that the user gets informed, that something is wrong with the file.

Jay: Do you like to improve the scripts?
Comment 5 QA Administrators 2016-11-08 11:16:37 UTC Comment hidden (obsolete)
Comment 6 Olivier Hallot 2018-07-28 11:31:48 UTC
Helpauthoring extension is deprecated. closing wontfix.