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

Customized whthost.js - not working as expected

Contributor ,
May 07, 2015 May 07, 2015

Copy link to clipboard

Copied

Hi,

I've used a customized whthost.js file for a couple years now with no issues.  Lately, it seems that clicking on a TOC entry does NOT expand it.  Clicking once on a topic in the TOC will display the content in the reading pane, clicking twice on it will (sometimes) expand the TOC.  Subsequent selections in the TOC seem to sporadically expand the TOC entries and then not expand the TOC entries.  I can't figure out why it's not working consistently & correctly.

I've customized whthost.js using William's awesomely helpful information here:  Make WebHelp TOC Wrap | WvanWeelden.eu‌, including wrapping the TOC around the images.

For fun, I've reapplied the customizations in a newly generated whthost.js thinking there's been an extra space or something in my customized file that I've overlooked and is now causing a problem. No luck.  This happens whether I'm viewing the docs in Chrome or IE, locally.  It doesn't discriminate

I've also customized  the spacing between each level of the TOC.

These are the only customizations in that file.

This problem does not occur on output files, which do not contain the customized file.  Once I copy/paste this file into my published files (or into my output file, the error occurs.

I also apply customized whtbar.js, whskin_banner.htm, whskin_mbars.htm, whskin_tbars.htm files.  But, I believe the TOC issue is in the whthost.js file.

Anyone else have this problem?

thanks!

RH 11.0.4.291,Webhelp

IE 10.0.9

Chrome 42.0.2311.135 m

Views

1.1K

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
Contributor ,
May 12, 2015 May 12, 2015

Copy link to clipboard

Copied

Is there any way to auto-wrap the TOC text without hacking the script? 

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
Contributor ,
May 12, 2015 May 12, 2015

Copy link to clipboard

Copied

Similarly, if this error also occurs when I click on a link in the content pane - the TOC will not expand to sync with the topic currently being viewed  (if it's during the time when the toc won't expand).  And yes, I do have "sync TOC" option in the SSL file selected.

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
LEGEND ,
May 13, 2015 May 13, 2015

Copy link to clipboard

Copied

The whthost.js holds the most important scripts for the TOC, but it could be something else as well. Do you get a different result if you run the modified whthost.js but WITHOUT the other modified files? (Just to make sure that this is the issue.)

If you open the developer console (F12) and click a link, do you get any errors on the console tab?

Unfortunately, in WebHelp there is no way to add reflow other than manually modifying the script.

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
Contributor ,
May 13, 2015 May 13, 2015

Copy link to clipboard

Copied

William,

Thanks for responding.

I tested the project without any modified files (the output), no errors, expansion and syncing are correct.

I tested the project with all modified files except the whthost.js, no errors, expansion and syncing are correct.

I tested the project with all modified files, including whthost.js - errors and expansion and syncing are incorrect.

I tested the project with ONLY the whthost.js - errors and expansion and syncing are incorrect.

This file contains your suggested modifications + 2 spacing/sizing edits.

var gsMargin="2pt";

var gsIndent="25pt";

I changed them back to the default numbers and tested again, same issues.

Interestingly, I generated a different version of the project about 3-4 wks ago and I don't have this error.  The only changes to the project are in content only.  I compared the whthost.js script from that earlier version of the project that works correctly, and it is identical to the one I'm using now.

Several users are reporting this error, so it's not only me.

When I open the project in IE and click on F12, this is the information I see:

HTML1527: DOCTYPE expected. The shortest valid doctype is "<!DOCTYPE html>".

index.html, line 1 character 1

SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited.

index.html

I also see this information when I open a project working correctly.

Is there any way to wrap the TOC without having to edit this file? (all this time Adobe hasn't made it standard?)


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
Contributor ,
May 18, 2015 May 18, 2015

Copy link to clipboard

Copied

I just wanted to update -

It seems that I could not get my issue resolved in time, so I had to use the auto-generated script, without TOC wrapping, for my deadline.  I don't know why my toc expansion and syncing sporadically broke, but if anyone else encounters this error, let me know, and if you know what went wrong, please let me know that too!

thank you!

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
LEGEND ,
May 18, 2015 May 18, 2015

Copy link to clipboard

Copied

This is very strange. I just tried another WebHelp output from RH11 with a modified whthost.js and it all worked like a charm. Perhaps there is a scenario that the change doesn't take into account. Would it be possible to share the project with me so that I can have a look?

Does the same issue occur when you generate a sample project and update the whthost.js file?

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
Contributor ,
May 29, 2015 May 29, 2015

Copy link to clipboard

Copied

yes, same with RH sample.

I created a sample project and could reproduced the error again.  I sent it to you.

thanks a million for all your help!


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
Contributor ,
Jul 02, 2015 Jul 02, 2015

Copy link to clipboard

Copied

I'm still having this issue. 

Are there any files, other than the whthost.js file that I can look at that would be causing the TOC to not expand when selected?  Is this the only file that controls the TOC?

As mentioned earlier, a project generated a few weeks prior does not have this issue (I'll call it project 1).  I took project 1's .hhk file and put it into the project which does not expand correctly (I'll call it project 2).  I applied the whthost.js file (from project 1)  to project 2 and the TOC did not expand as selected.

Project 2 contains a different stylesheet for the content, but the TOC style, spacing, font, etc are exactly the same.

Sometimes if I click enough times on a TOC entry, or when not expanded, move to another entry and  it will expand.......it's flaky.....

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
LEGEND ,
Jul 03, 2015 Jul 03, 2015

Copy link to clipboard

Copied

The cause of this is quite simple: the zoomsearch allows to search in multiple DUCC's at the same time. As long as you stay in the same DUCC, all is well. As soon as you jump with to a topic in another DUCC, it stops working.

The original issue was also cause by this, but I could work around that with some JavaScript changes. The TOC is another matter though. I don't see an easy way to overcome this, other than finding out whether you are in a scenario and redirecting the user to a the right DUCC. This is something to take up as a project and you can hire me to dive into this, but it will be at least a full days work.

I would suggest looking into the RoboHelp 2015 Dynamic Filters as you can achieve the same there while everything will keep working.

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
Contributor ,
Aug 28, 2015 Aug 28, 2015

Copy link to clipboard

Copied

Hi,

I'm not sure what DUCC has to do with the TOC expansion issue.  The issue occurs no matter what "content category" displays.

It worked on version A, stopped working as expected on version A.1.

On version A.1:

The TOC only expands after clicking 2-3 expandable TOC headings, then it seems to "catch" and expand and all is well.  Additionally, TOC syncing with the content pane does not work unless the TOC suddenly starts to expand correctly - then everything works.   Something has changed or stopped working between version a and a.1.

Other than content changes between those versions, plus tweaking the CSS, I can't think of any other changes that occurred.

Output files, using the non customized whthost.js, work great, TOC expansion & TOC synching works.

The TOC expansion/syncing issue occurs only when customization is applied.  I've even used a fresh output whthost.js file and applied customizations only to the point of TOC wrapping (not wrapping around images) and it breaks.  I've triple checked everything I can think of to find out why version A is okay and version A.1 is not.

Still using

RH 11.0.4.291,Webhelp

IE 10.0.9

Chrome 42.0.2311.135 m


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
Contributor ,
Oct 22, 2015 Oct 22, 2015

Copy link to clipboard

Copied

LATEST

I just wanted to follow-up here with my solution.

I found an old TOC from an earlier VERSION of the same project which did not have the toc expansion error.

I copied the good TOC to my current problem project and rebuilt the new TOC by adding/deleting/moving topics as needed.

Problem solved.

I still don't know what the cause was!


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
New Here ,
Jul 29, 2015 Jul 29, 2015

Copy link to clipboard

Copied

Using RH10 and I'm having the same problem, seemingly out of the blue. This is happening to me in IE8, Chrome (latest), and Firefox (latest).

I downloaded all of the recent patches that corrected the problem with WebHelp in IE10/11 Chrome and Firefox, and things were working fine until recently. Now when I create a new WebHelp output from any of my projects, the TOC entries do not expand until I click other entries 2 or 3 times.

I have NOT modified whthost.js, for the record (unless there is some way it gets customized by me doing something with the project).

Also not using DUCC.

Clients are frustrated over this. Hope Adobe can address this.

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
LEGEND ,
Jul 29, 2015 Jul 29, 2015

Copy link to clipboard

Copied

In your case, the problem would have a different cause. Can you share an example output that exhibits this issue? I would like to take a look. Please contact me at contact [at] wvanweelden [dot] eu.

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
Contributor ,
Aug 26, 2015 Aug 26, 2015

Copy link to clipboard

Copied

Hi mkocik11 -

did you find a solution to your problem on this?  thanks....

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
Contributor ,
Aug 26, 2015 Aug 26, 2015

Copy link to clipboard

Copied

Hi,

Still not resolved.  I'm really at a loss here.

The issue where the TOC doesn't expand as expected, and/or only expands after clicking 2-3 other expandable TOC headings, only occurs on published files when I apply the whthost.js customized files. Output files, without the customized whthost.js files work great.

Isn't there a way to wrap the TOC without having to apply a customized file yet?  I really am going to have to release this version WITHOUT wrapping because it's the only way these files work.  It looks terrible unwrapped, honestly and adds another scroll bar!

thanks!


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