• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

RH: 2020 Call from application using window.location.replace() from redirect topic stopped working

Community Beginner ,
Mar 16, 2021 Mar 16, 2021

Copy link to clipboard

Copied

We have a quite large structure of merged CHMs for our applications where we locate the corresponding chm using a call from the application with this call:

 

System.Windows.Forms.Help.ShowHelp(
this, path, HelpNavigator.Topic,
"redirect.htm#help_file.chm::/" + page);
 
The redirect.htm topic contains the following script code:
window.location.replace(window.location.hash.substring(1));
 
This has been working fine from 2013 and until now, when I upgraded the master project to RH 2020.
 
Is there anything that could have made this mechanism to break with this upgrade?
 
BR,
Rannveig

Views

212

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2021 Mar 16, 2021

Copy link to clipboard

Copied

The redirect.htm file lives outside the chm, right? So it's part of your application, which then opens the chm? It's been a long times since I used chms, so I'm rusty on how we used to work with them.

 

One thing with the upgrade is the underlying structure of the project, and potentially the output, changed. It's possible the "page" path is no longer the same as it was when generated from Classic. If you still have Classic installed on your computer, you could use Tools > Toolbox > HTML Help Studio to open the chm and check the internal structure to see if it's different from the old one. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 17, 2021 Mar 17, 2021

Copy link to clipboard

Copied

Thx for the response Amebr.

The redirect.htm is a part of the master chm file, as before (when it worked). We also tried to add a copy of it standalone in the same folder as the CHMs, but that did not do any difference.

 

As RH 2019 was uninstalled when I upgraded to RH 2020, I don't have that version installed now. 

What I noticed was that the contents of the <script> section with the JavaScript was removed when I upgraded the project to RH 2020. I added the JavaScript code from an old copy of the redirect.htm topic. Is there any change regarding this area from RH Classic to RH 2020?

 

Before the upgrade, the master project was in the same folder as the generated CHMs from the sub-projects. As of RH 2020 this is no longer possible, and the master project is now in a separate folder, in the same way as the projects for the other CHMs, and the output is generated to the same folder. As the generated CHM files still are in the same location, it is not obvious that this should be a problem.

 

Any ideas would be really welcome, as I feel really stuck with this problem. The developer has also done some testing from the code side, but we haven't found out anything else than that the redirect mechanism is not working. When we add back the master CHM from before the upgrade, everything works, so the change must have come with the new version.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 17, 2021 Mar 17, 2021

Copy link to clipboard

Copied

What's your point version of RH2020? One of the patches may have fixed your issue since RH2020's initial release.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 17, 2021 Mar 17, 2021

Copy link to clipboard

Copied

Jeff, my version is RH 2020.3.32, which seems to be the most recent.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 17, 2021 Mar 17, 2021

Copy link to clipboard

Copied

Yup - in that case I think you should chat with the RH folks - see https://helpx.adobe.com/contact/enterprise-support.other.html#robohelp for your support contact options.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 17, 2021 Mar 17, 2021

Copy link to clipboard

Copied

I have done so, and added a bug report to the RH team.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 17, 2021 Mar 17, 2021

Copy link to clipboard

Copied

Hi,

It is hard to investigate properly with the information that you provided. Possible reason that I could think at the top of my head is the value of the variable "page" and that present in the CHM is not matching. You could check this by opening your CHM file in HTML Help Studio and checking the topic name in the left panel and checking if the value of "page" variable matches any one of those.

If this doesn't help, could you send the generated chm file along with the values of "page" variable mention in your code snippet 

System.Windows.Forms.Help.ShowHelp(
this, path, HelpNavigator.Topic,
"redirect.htm#help_file.chm::/" + page);

That should make it easier to debug it.

Regards, 

Mayank Gupta

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 18, 2021 Mar 18, 2021

Copy link to clipboard

Copied

Mayank,

 

I don't have HTML Help Studio installed, and I have tried to find a place where I could download it, but I haven't been able to find it anywhere. Would you be able to provide a link, if it is available?

 

I have talked to the developer to verify what we submit in the ShowHelp call, and these are our findings:

The call contains the following value: 

redirect.htm#weatheradmin.chm::/Start_page.htm
 
The error message contains the following information:
res://ieframe.dll/dnserrordiagoff.htm#mk:@MSITStore:D:\projects\ICCMDMS\iccruntime\bin\Win32\gui\norsk\powertrade.chm::/redirect.htm#weatheradmin.chm::/Start_page.htm
 
When we locate the topic in the structure and show Properties, we see the following URL:
mk:@MSITStore:D:\projects\ICCMDMS\iccruntime\bin\Win32\gui\norsk\weatheradmin.chm::/Start_page.htm
 
So the topic is available in the CHM that we try to call.
 
We also tried the call without the "page" variable, just opening the CHM with the default topic, but as we see it, the problem is that the redirect mechanism does not work, either because the JavaScript code in the redirect.htm topic is ingored, or for some other reason.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 18, 2021 Mar 18, 2021

Copy link to clipboard

Copied

@MayankGupta They may be using Solution #2 on this page, I think. The information might help you with ideas.

http://kb.helpwaregroup.com/ms-html-help/merge/ctx2

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 18, 2021 Mar 18, 2021

Copy link to clipboard

Copied

Amebr,

Yes, that's exactly how the mechanism is on the code side.

 

Regards,

Rannveig

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 07, 2021 Apr 07, 2021

Copy link to clipboard

Copied

This issue has been solved by the help of Adobe Support. Due to changes in RH from the previous version used to create the master project, the redirect.htm file needed to be included in the TOC to be present in the compiled help file. After adding the topic to the TOC (with the option "Hide in output" selected), the mechanism worked as expected.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 07, 2021 Apr 07, 2021

Copy link to clipboard

Copied

LATEST

The simplest of things and it makes you want to tear your hair out. Yes now if a topic is needed in the build, it must be in the TOC.

 

Glad you have got it sorted.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp