Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 517421

Summary: [Help content] Using "Print selected topics and all subtopics" produces broken links
Product: [Eclipse Project] Platform Reporter: Minh Tu Ton That <minhtutonthat>
Component: UIAssignee: Minh Tu Ton That <minhtutonthat>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov
Version: 4.7   
Target Milestone: 4.7.1   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/98205
https://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=8e2fe1ac6f6539f86e99f5b936d68f2bac3a2da4
https://git.eclipse.org/r/103140
https://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=6e860a177bc54cece2852bc3f276f591aee93114
https://git.eclipse.org/r/103141
https://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=809381b1d63a0b49c4ddac27b3ab6757748e3ae5
https://git.eclipse.org/r/103144
https://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=244663ffaaa14421791e7f35df02b6e996874386
Whiteboard:
Attachments:
Description Flags
Please find in attachment the plugin and its source to reproduce the problem
none
Illustrative image none

Description Minh Tu Ton That CLA 2017-05-30 07:39:23 EDT
Created attachment 268630 [details]
Please find in attachment the plugin and its source to reproduce the problem

When a topic references a href with anchor, using "Print selected topics and all subtopics" produces in Table of content a broken link. 

Please find in attachment an image to illustrate the problem and a plugin to test. The plugin consists of a toc with some chapters and topics. Links to chapters work since their href refers to a html while links to topics fail since their href refers to an anchor in a html
Comment 1 Minh Tu Ton That CLA 2017-05-30 07:40:27 EDT
Created attachment 268631 [details]
Illustrative image
Comment 2 Eclipse Genie CLA 2017-05-30 07:44:20 EDT
New Gerrit change created: https://git.eclipse.org/r/98205
Comment 3 Minh Tu Ton That CLA 2017-05-30 07:49:13 EDT
I proposed a patch to solve this problem. If the topic references a html, we keep the same behavior, which generates a href towards section + id. Otherwise, if the topic references an anchor, the generated href should point towards the anchor's id. Would you mind having a look at it ?
Comment 5 Alexander Kurtakov CLA 2017-06-27 10:49:21 EDT
Thanks for the nice patch. It's pushed to master now and will be in the next release. And sorry for the delay, we have missed it in the churn surrounding the current release.
Comment 6 Minh Tu Ton That CLA 2017-07-03 07:57:34 EDT
Thanks for the review. Just a small question, could I do a cherrypick to the branch 4.7 so that we can have the fix earlier in Eclipse Oxygen ?
Comment 7 Alexander Kurtakov CLA 2017-07-03 08:10:27 EDT
Yes, 4.7 should be open for backports after this week so please do it next week. Reopening for the backport.
Comment 8 Eclipse Genie CLA 2017-08-16 04:02:35 EDT
New Gerrit change created: https://git.eclipse.org/r/103140
Comment 10 Eclipse Genie CLA 2017-08-16 04:10:38 EDT
New Gerrit change created: https://git.eclipse.org/r/103141
Comment 12 Eclipse Genie CLA 2017-08-16 04:44:27 EDT
New Gerrit change created: https://git.eclipse.org/r/103144
Comment 14 Alexander Kurtakov CLA 2017-08-16 04:59:23 EDT
Backported.