Page 1 of 1

Link keyref not working in WebHelp

Posted: Tue May 28, 2013 7:05 pm
by pault
There seems to be a problem with using keyref with the links tag.

I have tested this both in my customized WebHelp and the unmodified WebHelp transformation. The problem exists in the non-framed version, but not the framed version.

From the same document, this link works:

<p><xref keyref="architecturePlanningEC2">test link</xref></p>

but this link does not:

<related-links>
<link keyref="architecturePlanningEC2"/>
</related-links>

Interestingly, if you hover the mouse over the link in the generated help, it points to the correct address:

file:///.../webhelp/index.html#cassandra/architecture/architecturePlanningEC2_c.html

When you click the link, it truncates the URL (and brings up an empty pane):

file:///.../webhelp/index.html#architecture/architecturePlanningEC2_c.html

Re: Link keyref not working in WebHelp

Posted: Wed May 29, 2013 5:30 pm
by sorin_ristache
Hi,

I guess you just hit a bug which was fixed in the latest maintenance build of 14.2. The URLs that come from relative paths were truncated in the non-framed version. Please make sure you are running the latest build of 14.2 from the Download page (build number 2013051016).


Regards,
Sorin

Re: Link keyref not working in WebHelp

Posted: Tue Jun 04, 2013 11:15 pm
by pault
Hi Sorin,

I installed the maintenance release (2013051016) but the problem still exists. This time I also tested it using a regular link (<link href="../architecture/architecturePlanningEC2_c.dita"/>) and the behavior is the same.

Any other suggestions?

Paul

Re: Link keyref not working in WebHelp

Posted: Wed Jun 05, 2013 3:48 pm
by sorin_ristache
Hi Paul,

I am sorry but I cannot reproduce the problem in Oxygen 14.2. I tried with both normal links (the href attribute) and key references (the keyref attribute), both in the body element (using an xref) and in the related-links one (using a link). Can you send us a small set of sample files for reproducing the problem: a small DITA map with the topics included in the map?



Regards,
Sorin

Re: Link keyref not working in WebHelp

Posted: Fri Jun 07, 2013 6:55 am
by pault
Hi Sorin,

I have send a truncated sample version that illustrates the problem.

Thanks for your help.

Paul

Re: Link keyref not working in WebHelp

Posted: Fri Jun 07, 2013 4:56 pm
by sorin_ristache
Hi Paul,

Thank you for the sample files but they are too truncated because I get no HTML topic files in the output directory. Can you send a larger set of files? You can test the Webhelp transformation on the sample map and topics before sending them.


Thank you,
Sorin

Re: Link keyref not working in WebHelp

Posted: Mon Jun 10, 2013 5:59 pm
by pault
Hi Sorin,

I sent you the files on the 7th.

I noticed that the same kind of thing is happening with the term references, where an xref works but the term ref doesn't:

<term keyref="gloss-read-repair">read repair</term>

I installed Oxygen 15 and ran the default WebHelp to see if it solved the problem, but it didn't.

Best regards,

Paul

Re: Link keyref not working in WebHelp

Posted: Tue Jun 11, 2013 4:34 pm
by sorin_ristache
Hi Paul,

I finally tracked down the bug to an obscure JavaScript function definition. To fix the problem in Oxygen 14.2 please replace your file [Oxygen-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\search\nwSearchFnt.js with this file (just unzip this zip archive, the JavaScript is zipped for security reasons). Of course this fix will go in the next maintenance build of Oxygen 15.0 as well.

We could not reproduce the problem with our own large DITA map which we use for internal testing and which includes many topics with Related Links sections, so your sample files were really useful.


Thank you,
Sorin

Re: Link keyref not working in WebHelp

Posted: Wed Jun 12, 2013 8:36 pm
by pault
Hi Sorin,

I tried it and had one of my coworkers try it and the same problem still exists. In fact, search doesn't work when using the new file. Also I had the same results with both the default WebHelp and our custom scenario.

Is there some other configuration change that needs to be made? I tired running the DITA OT integrator, restarting Oxygen, and my computer.

Regards,

Paul

Re: Link keyref not working in WebHelp

Posted: Thu Jun 13, 2013 12:10 pm
by sorin_ristache
Hi Paul,

No other configuration change is needed, only replace the nwSearchFnt.js file in the specified subdirectory of the Oxygen install directory. Both the links from the Related Concepts section and the search should work correctly. I tested the above patched file which I uploaded for you in Oxygen 14.2 and it fixed the problem.

Do you mean clicking on the links from the Related Concepts section still does not open the correct target topic, but still blanks out the right side panel?

Is any error displayed when you press the Search button, or it just has no effect, no search results are displayed in the browser page?

Please remove from disk both the output and the temporary directory of the Webhelp transformation, either manually in Windows Explorer or by setting both the parameters clean.temp and cleat.output to yes in the DITA WebHelp transformation, and repeat the same transformation. If the WebHelp search still does not work please send us or post here the full content of the DITA OT output view where the output messages of the Webhelp transformation are displayed.


Regards,
Sorin

Re: Link keyref not working in WebHelp

Posted: Fri Jun 14, 2013 1:06 am
by pault
Hi Sorin,

I already have set clean output and clean temp, but I manually deleted the output just in case. I am using Mac Lion (10.7.5) by the way, not Windows.

The behavior is the same as before. From the files I sent you previously, open Security, select Configuring firewall port access, and select either of the topics listed under Related concepts/task, it opens a blank page.

When trying to use Search with the new nwSearchFnt.js file, nothing happens at all.

I uploaded the build report, but I don't see any errors.

Thanks for all you effort.

Paul

Re: Link keyref not working in WebHelp

Posted: Fri Jun 14, 2013 9:31 am
by sorin_ristache
Hi Paul,

Thank you for the output messages but they don't shed much light on the problem. I see that the output was not removed automatically before the transformation because clean.output was false:

Code: Select all

     [echo] * clean.temp = true
[echo] * clean.output = false
Anyway you removed the output dir manually so that should be enough. What is Chunk1452353723.xml? I don't remember seeing this file in the previous set of files that you sent.

Please send us a sample set of files that includes both input files (DITA maps, DITA topics) and the output files generated from these input files. I am not sure yet why you get a different result than me using the patched JavaScript file that I provided, I have to look into a complete set of files.


Thank you,
Sorin

Re: Link keyref not working in WebHelp

Posted: Mon Jun 17, 2013 1:45 am
by pault
Hi Sorin,

I sent the entire source and output.

Thanks for your help.

Paul

Re: Link keyref not working in WebHelp

Posted: Mon Jun 17, 2013 4:21 pm
by pault
Hi Sorin,

I just realized that I sent you the files without the new nwSearchFnt.js file in place. I am uploading them now.

Paul

Re: Link keyref not working in WebHelp

Posted: Mon Jun 17, 2013 4:36 pm
by sorin_ristache
Hi Paul,

Thank you for the new set of files. In this Webhelp output the links work correctly. For example I tried the links from Security - Configuring firewall port access - Related concepts and Related tasks and they work correctly. What links do not work for you in the output files (the out/webhelp subdirectory) in this last set of files that you sent?

If all the links work correctly in the last set of files and if nwSearchFnt.js is the only difference between this last set of files and the previous one, then we found the cause of the problem and we fixed it: replace the old nwSearchFnt.js with the modified version which I provided.


Regards,
Sorin

Re: Link keyref not working in WebHelp

Posted: Tue Jun 18, 2013 7:22 am
by pault
Hi Sorin,

I think you might have missed my previous message, which said that I had inadvertently sent you files with the original nwSearchFnt.js. file instead of the new one. I did sent another set of files with the new nwSearchFnt.js in place, which I uploaded just a few minutes before you posted your last message. However I have discovered more about the problem:

I just now uploaded the files I gave you (generated from the default Oxygen WebHelp) to our staging server and the links work on Mac Safari and in Chrome, but not Firefox. I hadn't done this before and just tested in Firefox locally, as Chrome doesn't like local iFrames. I also tested the new nwSearchFnt.js file with our customized templates and the links work, except in Firefox--both locally and on the server.

However, Search does not work in any of the three browsers with the new nwSearchFnt.js. Enter a term, click Search and nothing happens.

So it seems we are part way to the solution. Please try this using the last set of files I sent you.

Thanks,

Paul

Re: Link keyref not working in WebHelp

Posted: Tue Jun 18, 2013 12:15 pm
by sorin_ristache
Hi Paul,

Thank you for the files but the map has too many validation errors (broken references) so I could not get the Webhelp output for testing the links and the search problem. However I identified a probable cause and fixed it. Please replace the following files in your [Oxygen-14.2-install-dir] directory:

Code: Select all

[Oxygen-14.2-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\js\toc.js

[Oxygen-14.2-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\js\tocWDiv.js

[Oxygen-14.2-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\js\webhelp.js

[Oxygen-14.2-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\search\nwSearchFnt.js
with the files having the same names in this archive. This should fix the problem. Please run again the DITA Webhelp transformation on the same map.

If it still does not work (the links from Related Concepts do not open the linked pages or the search does not work) then send us a working map for reproducing the problem, that is a map which is reported valid by the action Validate and Check for Completeness available on the toolbar of the DITA Maps Manager view. Deploying your output from the DITA Webhelp transformation on a server and sending us the URL for testing would be also useful.


Regards,
Sorin

Re: Link keyref not working in WebHelp

Posted: Tue Jun 18, 2013 3:15 pm
by pault
Hi Sorin,

The link to this archive gives me this error:

Not Found

The requested URL /forum/files/webhelp-search-fix-Oxygen-14.2.zip was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I also don't understand why the files I'm giving you have any errors. I always validate. Plus I ran the validation on the same files I sent you the next morning after making a small change in one file before posting live and there were no errors.

Paul

Re: Link keyref not working in WebHelp

Posted: Tue Jun 18, 2013 3:38 pm
by sorin_ristache
Hi Paul,
pault wrote:The link to this archive gives me this error:

Not Found

The requested URL /forum/files/webhelp-search-fix-Oxygen-14.2.zip was not found on this server.
You are right, sorry, I uploaded to the wrong server (slight difference in the server name). Please download the zip from this archive]here. I corrected the link also in the above post.
pault wrote:I also don't understand why the files I'm giving you have any errors. I always validate. Plus I ran the validation on the same files I sent you the next morning after making a small change in one file before posting live and there were no errors.
You have a DITA specialization I suppose (concept_ds.dtd, task_ds.dtd, topic.dtd, all with custom PUBLIC ID declarations), with the DTDs resolved through your own XML catalog. The XML parser cannot find these DTDs and this is the cause of the errors. Can you send the DTDs too please? Of course this would be necessary only if replacing the JavaScript files from [Oxygen-14.2install-dir] with these ones and repeating the Webhelp transformation does not fix the two problems: the links in the Related Concepts/Related Topics/etc sections and the Webhelp search.


Regards,
Sorin

Re: Link keyref not working in WebHelp

Posted: Tue Jun 18, 2013 6:36 pm
by pault
Hi Sorin,

So some progress.

I replaced the files as you directed. We're almost there!

* Search now works in Chrome, Safari, Firefox, and IE.
* The links in the Related topics problem pages work in Safari, Chrome, and IE but not Firefox in our customization.
* The links do not work in the default webhelp.

I have uploaded the source files, generated output (separately for each webhelp), and the specialized DTDs on the Technical Support page. In the description of the problem are two URLs, where you can see what's going on. In the description, I did say it wasn't working in Chrome, but apparently it was a caching problem because I tried it from my personal computer and it worked. Chrome must be caching the blank page.

Thanks for the quick response and all this effort.

Paul

Re: Link keyref not working in WebHelp

Posted: Wed Jun 19, 2013 3:06 pm
by sorin_ristache
Hi Paul,
pault wrote:* The links in the Related topics problem pages work in Safari, Chrome, and IE but not Firefox in our customization.
I don't know what you customized in the Webhelp transformation, you did not specify any details about that in our discussion so I can't know what could be the cause. What did you customize in the transformation, where should I look for possible problems?
pault wrote:* The links do not work in the default webhelp.
I looked at the output that you generated with the default Webhelp transformation and I found and fixed one more problem in the JavaScript code. Please replace your file [Oxygen-14.2-install-dir]/frameworks/dita/DITA-OT/plugins/com.oxygenxml.webhelp/oxygen-webhelp/resources/js/tocWDiv.js with this file tocWDiv.js which should fix the link problem in the standard Webhelp transformation that comes with Oxygen. I can't test it with your custom transformation yet because I don't know any details about it.
pault wrote:I have uploaded the source files, generated output (separately for each webhelp), and the specialized DTDs on the Technical Support page.
Sorry, you did not send the specialized DTDs. You included only a directory z_customizations with some *.dita files and *.properties files. No DTD files (concept_ds.dtd, reference_ds.dtd, task_ds.dtd, topic.dtd). So I still cannot run the default Webhelp transformation on your source files because I get the errors that I mentioned previously caused by the missing DTDs.


Regards,
Sorin

Re: Link keyref not working in WebHelp

Posted: Fri Jul 19, 2013 6:03 pm
by pault
Hi Sorin,

Sorry for the delay in responding. I had a product release that took precedence. I've installed Oxygen 15 and redone my customizations and the problems are gone.

Thanks for all your help!

Paul

Re: Link keyref not working in WebHelp

Posted: Mon Jul 22, 2013 10:53 am
by sorin_ristache
Hi Paul,

Thank you for letting us know. Just let us know if the problem occurs again.


Regards,
Sorin