https://bugs.documentfoundation.org/show_bug.cgi?id=115254

            Bug ID: 115254
           Summary: [NEWHELP] Some branch bookmarks are not working
           Product: LibreOffice
           Version: 6.1.0.0.alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Documentation
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Description:
On opening some new help pages from LibreOffice dialogs, the default page opens
even if a bookmark "branch" is sent by the software.

Steps to Reproduce:
1. Open a dialog
2. select a widget
3. hit F1

Actual Results:  
Sometimes, the help page is the default page (writer entry page) and sometimes
the help page is correct.

Expected Results:
Always open the right help page


Reproducible: Always


User Profile Reset: No



Additional Info:
The issue is in a small piece of Javascript, inside index2.html at 

https://opengrok.libreoffice.org/xref/help/help3xsl/index2.html
+++++++++++++++++++++++++
 var bookmark = rest.slice(rest.indexOf('/')+1, rest.indexOf('?'));
    var file = map[bookmark];
    // rebuild URL
    if (file === undefined){
    file = defaultFile;
    }
+++++++++++++++++++++++++

map[bookmark] is a map that transform the URL sent by LibreOffice to the right
HTML page. It is a simple map generated by get_url.xsl

https://opengrok.libreoffice.org/xref/help/help3xsl/get_url.xsl

If the bookmark "branch" does not exist in the map, a default page in open.

Th issue occurs because some dialogs have only one bookmark branch for the main
help page and lack the branch for the dialog widgets. For example, 

<bookmark xml-lang="en-US"
branch="hid/modules/swriter/ui/watermarkdialog/WatermarkDialog"
id="bm_id3155897" localize="false"/>

will open the page /text/swriter/01/watermark.html (source is
/text/scalc/01/watermark.xhp)

but 

<bookmark xml-lang="en-US"
branch="hid/modules/swriter/ui/watermarkdialog/TextInput" id="bm_id3155897"
localize="false"/>

will open the default page because there is no entry for the TextInput widget
of the dialog in the map.

To fix that, the hard solution is to insert the bookmark branch for every
dialog widget in every help page associated with a dialog. It's the right thing
to do, but can be quite hard.

The second solution is to improve the map or javascript and analyse the
bookmark to see if there is another bookmark for the same help page. In the
example above, the missing bookmark for TextInput should open the page for
WatermarkDialog.

So, when the map return undefined", check again with pieces of the URL. 



User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101
Firefox/58.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to