Apr 8, 2009 12:51 PM
Related Topics control via "JavaScript:RelatedTopics.Click" broken in RH8
-
Like (0)
In my RH6 project, I summon a hidden Related Topics control via "JavaScript:RelatedTopics.Click", which works just fine. However, this feature didn't survive the upgrade to RH8. It probably isn't directly related to the upgrade, as I haven't been able to construct this mechanism from scratch in RH8, either. Well, not in a way that works...
A plain vanilla unhidden Related Topics control works OK, but not the JS construct.
Any hints or suggestions? I'd like to keep using this feature if at all possible.
Thanks,
G.
Hi there
It will still work, but now requires further tweaking!
Before I tell you how to fix it you have to promise to enlist the armies to flood the Adobe RoboHelp developers with Bug Reports on it! ![]()
Click here for the Bug Report!!!
Okay, here's the deal. After you insert the control and all that, you need to pop into the HTML code and assign the ID to the code. I'll post some screen captures below. (Click the images to see in full size view)
RoboHelp 7
RoboHelp 8
So all you need to do is to add in the missing ID for the RoboHelp 8 code.
Cheers... Rick ![]()
Rick, you are a giant among men!
I have submitted a bug report.
I am now about halfway there. This is clearly the answer, but I'm stuck on a couple of details. First and foremost, how do I get changes to stick in HTML view? I know I saw something about that somewhere in here, but now I can't find it. I got the id change to stick in one topic, and it now works in Preview mode. However, it choked when I generated output. If I can get the @#$! changes in HTML view to stick, it'll make testing a whole bunch easier!
Thanks! and ever hopeful...
G
Hi again
Well Carp! FrapDoodle even!
Okay, I may have a workaround here. Give this a go. ![]()
I'm attaching a text file for you to use as a guide. It may take half an hour or so for the forums to approve it and make it available once I post. Until then, you will see "QUEUED". You will need to refresh the web page to check the status. Once it's been uploaded, there will be a link.
Please let me know if or how well this worked for you.
Cheers... Rick ![]()
Well, yes, I've been carping and frapdoodling like crazy. Just wanted you to know that I'd not forgotten you. I had some other fires to put out.
I wasn't able to get the script box approach to work. It gave me errors. Perhaps I wasn't starting and stopping at the right point with what I put in there.
After a bit, I was able to make the changes stick for long enough to do a little testing. Then I dropped sideways down a rabbit hole, trying to figure out how the id of the calling button fits into this. At first, it looked like that was a requirement to make the whole thing work. And then it didn't. Then I noticed that I was applying the "RelatedTopics" id in two separate instances. Well, that can't be right, either. I was having a hard time testing one thing at a time--too many variables!
It's all made my head hurt. I am going to have to table this particular problem for a while and get on with other evaluation and testing of RH8. I *will* return to this problem, though.
Thanks for your help, Rick. I'll be back to this in a week or two. In the meantime, please send me some virtual aspirin.
G.
Update: I've gotten the related topics control to work again, but it's not clean. ![]()
Here's the deal. There are two necessary elements that are not appearing in the RH8 topics. The first, as Rick pointed out, was the id="RelatedTopics" bit. The second missing piece was a chunk of code at the end of the topic, something like:
<?rh-script_start ?><script type="text/javascript" language="JavaScript1.2">//<![CDATA[
if( typeof( InitEffects ) != \'function\' ) InitEffects = new Function();
InitEffects(\'a1\');
//]]></script><?rh-script_end ?>
...where 'a1' is the id of the button I used to access the hidden RelatedTopics control. The button (a1) lives in the template, er, master page (I *must* get used to the new terminology!) header, and the InitEffects code isn't getting carried over to the topic. Unless I include that part (and the missing id), clicking on the control generates an error. (Without the master page involvement, I apparently don't need to worry about the InitEffects part.)
Interestingly, the control needs the id="RelatedTopics" in two places. It does exist in the first spot, but is missing in the second instance. The same appears to be true of the SeeAlso and KeywordSearch controls, BTW. (Before I realized it was supposed to show up twice, in two separate but similar-looking instances, I was going crazy trying to figure out why it was staying and going and staying and going...
)
To make matters worse, editing the HTML code is only a transitory solution. As soon as I do anything in the WYSIWYG view for that topic, the HTML changes vanish. (I didn't have any success putting the script in the script box. If I did that, then RH didn't seem to understand that it needed to use that code.) So for the short term, I slapped together a script that adds in the missing bits. So to get output, I close the project, run the script, and then generate via command line. (I can also generate from the project, as long as I don't get into any topics that were altered.) If I need to use this solution for real production, I'll have to do a better script, one that will do a cleaner FAR. For now, while I'm testing, this is OK.
OK, so I have a workaround, and my Related Topics display and operate correctly. Hooray! The next problem is applying this solution to a RoboSource-Controlled project. Now THAT is worrisome. ![]()
Rick, thanks for your assistance. I've got more work to do on this problem, but it can wait for a bit, I think.
G
I tried the fix suggested by RoboWizard below and it did not work for me. I'm using RH8 and IE8. It is worth noting that this problem does not occur in Firefox 3.5.2.
It's also worth noting that if you move the Related Topics button to the top of the page, it works fine. I tried putting in at a random spot in the middle of the topic and it did not work.
Bob
Rick and Gravenstein,
First of all, I really appreciated being able to find info about this error in the forum. Thank you for that!
Any word on when we can expect a fix from Adobe? (If not, how can I nag them?) I have a help project that contains many hundreds (maybe even thousands) of these links. Every single one of them is generating a script error. A solution that has to be updated using a script each time changes are made in the WYSIWYG view is not viable except as an emergency measure.
(I haven't even tried the fix offered in this thread. The sheer volume of changes necessary precludes manual corrections.)
Thanks
Eileen
Hi Eileen.
Adobe, like most other software vendors, are not in the habit of announcing when a service/patch release is to be released least of all what will be included in it. All we can do is sit and wait.
Have you considered using a good find and replace tool. FAR is my favourite but BkReplacEm is also widely used and is free.
Read the RoboColum(n) for a tips, tricks and musings on the Technical Communication Suite products.
I'm a frequent user of FAR. But that's not going to help me much if the changes are lost next time I (or one of my colleagues) opens the topic in RH's WYSIWYG editor.
I filled in a bug report and asked for an update on what they plan to do about this. I'll post again here if I hear anything.
(I work for a software company that DOES tell users what releases are in the works and what they will contain. AND we usually keep our word.)
Regards,
Eileen
Hi Eileen
The best way I'm aware of to "nag" Adobe about an issue is for them to be deluged with Bug Reports. Some folks probably think this is just a place they have made for you to spout off and the reports all drop into the circular file. But trust me, the developers DO see these things. And the more reports about a certain issue they receive, the higher the liklihood of us seeing a fix!
Cheers... Rick ![]()
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7 or 8 within the day - $24.95! |
Hi,
Can you please share a sample project which exhibits this issue. Can you share a Robohelp 6 project?
I will try to upgrade this to RoboHelp 8, and try to find the root cause of the issue you are facing.
-Praful
I'm more than happy to provided this very stripped-down version of one of the projects we have having trouble with.
Note: This is a RH7 project. I'm sorry but I don't have RH6 so I was unable to provide that.
The zip file contains a CHM file. Click on any of the topic in the TOC and you can see how the links work.
Extract the project from the ZIP file and open it in RH8. After it is upgraded, compile the CHM file. In the new file you will see that every link is broken.
We're very interested to hear the results of your examination. ![]()
I believe the previous posts in this thread confirm the bug and offer a manual workaround. However, that manual workaround is not a long-term solution because you can't open, edit, and compile the project in RH8 after the "fix".
Regards, Eileen
Hi Praful
Eileen is correct. Please do take a moment and read the thread from the beginning. I've documented the issue with images in this thread as well as having submitted at least two different bug reports reporting the same issue. ![]()
Cheers... Rick ![]()
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7 or 8 within the day - $24.95! |
Hi All,
I was able to see the issue regarding the Design time controls, and this I think is a bug which creaped into the RoboHelp 8 Code base.
Surely the RoboHelp team will provide a solution to this issue (can not say when).
But I tried to see if there was a workable solution, which can be achieved by scripting.
So I have a created script file which will parse the project, and fix all the design time controls and add the missing ID if it was missing.
Now since there is a bug in the HTML editor, so every time a user goes and edit the topic, the ID is sort of automatically eaten up by the HTML editor in RoboHelp 8.
So the only solution is run the script file before generating the ouptut, and this script will fix all the issues related to the Design time control.
I have uploaded a zip file @ https://share.acrobat.com/adc/document.do?docid=b8786cef-681c-4656-910 7-f5038466885a
Also I have attached the zip file in the forum post as well.
On unzipping this file, you will find 3 script files, and they do the following things
So if you want to generate a webhelp SSL output, just run the 2nd script and it will patch the project and generate webhelp, in one click
and if you want CHM, then run the 3rd script.
Again, do let me know if this really fixes the issue you faced.
And yes, Please report bugs which ever you find to the adobe bug report, and your suggestions as well regarding the features you may want in future RoboHelp release. ![]()
Hope this script help
Praful Jain
Praful,
Thank you very much for looking into this. This is more response than we got from our multiple bug reports (for example last April, it looks like, and more recently for me).
If I understand you correctly, using these scripts we should be able to use RH8 as normal, editing the help topics right in the WYSIWYG editor. Then we run the script (as you described) for compiling. Is that correct?
If so, then that's a solution I think my team can live with for now. It's certainly better than maintaining some projects in RH7 and others in RH8 -- and having to keep track of which are which. Of course, a patch or service release would be even better. ![]()
Best regards,
Eileen
Hi Eileen,
You are correct, you can use RoboHelp 8 to edit the HTML topics normally Only before generation you need to run this script file.
Praful Jain
Praful, I am looking forward to trying your script solution, but there seems to be a problem with the ZIP file. When I try to open the downloaded file, I get an error message from WinZip: "Cannot open file: it does not appear to be a valid archive. If you downloaded this file, try downloading the file again."
I repeated the download but still cannot open the file.
Could you please create a new ZIP file and make it available.
Thank you
Eileen
Hi,
I have uploaded the file @ https://share.acrobat.com/adc/adc.do?docid=b8786cef-681c-4656-9107-f50 38466885a
Also I am uploading the zip file again.
Hope this will help.
-Praful Jain
I got the new file and tried it out. I did some spot-checking and haven't found any broken links yet. So your script seems to work perfectly. I will post back here if I find any problems, but in the meantime I'd say that anyone can use these scripts to fix the "JavaScript:RelatedTopics.Click" links in a project that was upgraded from RH7 to RH8.
I can't thank you enough!
/Eileen
I just checked the first one attached to the post and it unzipped OK using WinZip.
See www.grainge.org for RoboHelp and Authoring tips
Hi,
Good to hear that your problem is solved. Please do reply back after verifying the issue completely. This will help others as well.
-Praful Jain
Well, Peter, I'm not sure what the point of that was, but when I downloaded it and tried to open it, it did not work. Twice. Other ZIP files I've downloaded from this forum. have worked fine.
But at any rate, we now have a new one.
Regards, Eileen
The point was to let you know that it did work OK here using WinZip. My thinking was that maybe you were using some other zip tool or that maybe something had gone wrong with the download. I thought by knowing the file was good for someone else, you could try again with maybe more success.
That is why I posted.
See www.grainge.org for RoboHelp and Authoring tips
Hi Praful
As the issue isn't strictly related to Related Topics (I believe it's related to general handling of any of the design time controls) will your script work if the control type is Shortcut? Or See Also?
Cheers... Rick ![]()
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7 or 8 within the day - $24.95! |
Hi Rick,
Script file does not have any thing specific to related links, so my assumption is it should work fine with other design time controls.
Again, I have not verified, some one need to test this script with other design time controls and see if it fixes the issue with controls other then related topic control.
Do let me know if the script does not work for other design time control.
-Praful
Hi Rick,
I tried creating a sample RoboHelp 7 project and added Related Topic control, See Also Control and Keyword Link Control in different topics, now using javascript call the webhelp output works fine in RoboHelp 7.
I upgraded the project and as discussed earlier, due to some bug in HTML editor, the ID of design time control goes missing.
I ran the script file and generated the webhelp output, and
all the controls started working fine as expected.
So people out there can try this script file for all different types of design time control, and hopefully, the script should fix the ID problem.
-Praful Jain
Hi Praful
Awesome! Thanks so much for testing. I'm hoping to see that a service release appears that corrects that niggling little issue. ![]()
What would be cool is if we had an option where we could specify any scripts to run prior to generating output. Perhaps in the SSL dialogs.
Cheers... Rick ![]()
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7 or 8 within the day - $24.95! |
Hello. I'm jumping in this thread to ask a related question. Rick (robowizard) provided a tip on a workaround on how to get our shortcuts working again, and I submitted a bug report. In response to the bug report Praful supplied a link to the ZIP file and I have downloaded. I've also asked some further questions of Praful regarding how/when/where to execute the scripts.
No one has mentioned if they are using RH8 in RoboSource control. Will RSC throw up a red flag due to the changes made by the script? I'm thinking it might complain about changes made outsite the project. Are there other issues when using RSC related to this fix?
Hopefully this is not too vague of a question, but this whole issue is putting us in deeper water than we are used to, and I want to make sure as many bases as possible are covered before running the scripts.
Thanks for any information anyone can provide.
Joe
Hello everybody, and Happy new year.
I have the same problem occuring to my projects.
Praful's javascripts seems to be the solution, but I didn't manage to execute them. Can someone explain me how/when/where to execute the scripts ?
Thank you in advance.
Nathalie.
Nathalie,
Below are the instructions to use the scripts slightly modified. I have not had a chance to test this yet on my project. BE CAREFUL!
There is a user forum thread @ http://forums.adobe.com/message/2342314, where this script file was uploaded. You need to get it if you have not.
The zip file contains 3 script files as listed below. Use the one that applies to your project (Webhelp or HTML/CHM).
· “ Related Topics From Javascript Call ” which just patches the project and does not generate the output.
· “ Related Topics From Javascript Call and generate Webhelp ” which patches the project and generate webhelp output
· “ Related Topics From Javascript Call and generate CHM ” which patches the project and generate CHM output
Then follow these steps to execute the script file. IN STEP 5 YOU MAY WANT TO IMPORT A DIFFERENT SCRIPT extracted from the ZIP file as it pertains to your own situation (Webhelp or CHM output).
1. Backup the project, before proceeding further.
2. Download the zip file and extract the file.
3. Open RoboHelp 8, and go to view > Pods > Script Explorer. This will open a script explorer pod.
4. Right Click on the script explorer pod area and it will show a context menu, select Import menu option.
5. Select the script “Related Topics From Javascript Call and generate CHM.jsx” file which you extracted.
6. You are done with import of the script file.
7. Open the project where you want to generate the CHM file.
8. In the Script Explorer select the imported script file and Right click and select Run and this will run the script file.
Hello,
Thank you very much !
It is working perfectly (a bit long on large projects, you have the time to go and have a coffee, but it doesn't matter compared with the initial problem).
It is a very useful alternative, waiting for a Robohelp update fixing the bug (I reported the bug to Adobe).
Nathalie
Nathalie,
You are welcome. I'm glad it is working for you. I submitted a bug report as well, and I'm sure there are others. I'm not holding my breath on a fix, but hopefully they will fix it at some point.
Joe
Can't seem to get the script to execute. Just crashed Robo8.
This related topics defect has been around a while.
C'mon Adobe, let's get 'er done.
Script ran. Got "Bad token Manager" popup.
.
The more I look, the more confused I get.
It apears to me that, in some cases, the Related Topics control is translated into some code when published that looks something like this:
onclick="var e; if (parseInt(navigator.appVersion)>=4){e=event;} if (parseInt(navigator.appVersion) >=2 && typeof(PickupDialog_Invoke) == 'function') PickupDialog_Invoke(e,'','Claims','Claims.htm','Endorsement: Additional Interested Party','EndorsementAIP.htm','Endorsement: Basic Information','EndorsementBasicInfo.htm',...
etc.
This control works! But there is no evidence of a DesignerControl.
In other cases, the related topics OnClick that is in the source file is retained after publishing:
<a href="JavaScript:RelatedTopics.Click()"><img id="header_reltopics" src="../cssimgs/btn_related.gif" alt="btn_related.gif" style="border: none;" width="105" height="26" border="0" />
In this case, there is no DesignerControl and no replacement code, just a button that does nothing,.
I cannot ascertain why one publishes with one format and the other in a diff fashion.
This is blowing my mind. I'm the only one dealing with this?
Never did get the script to run that patches the ID...
Still broken since Oct. '09.
I sent another bug report.
Sad.
Perhaps try some of the things suggested in this thread. The errors sort of sound similar.
Tools > Scripts > Word Count is broken; can I fix it?
As always, create a backup of your project before starting.
Specifically:
1. Try running it in a new test project (or maybe one of the sample projects?) to see if it works there. Then you would know if is something specific to your project is causing a problem.
2. Delete the cpd and try again.
3. The msg(filepath) bit sounds interesting, but I don't know any scripting or where to put it, but maybe you have a resource who could have a go.
Amebr
Hello again,
I just used the Related Topics From Javascript Call and generate Webhelp script and noticed a problem: If a help topic contains two links to the same RelatedTopic list (that is, two occurrences of <a href="javascript:RelatedTopic0.Click()" class="popuplk">), then the first one works in the WebHelp but the second one doesn't.
If I open the topic in RH's WYSIWYG editor, I can't see any difference between the two links. Perhaps the simple act of opening them in the editor is changing the source?
At any rate, I was hoping that Praful (or somebody else) would be able to provide a way to solve this.
Regards,
Eileen
Hi,
I know this is an old thread, but I have the same problem with a project that still is in RH7. Is this problem solved in RH9? I have RH8, but could be able to upgrade to RH9 if that means this will work as before.
Best regards,
Rannveig/.
I'd also like to know if this was fixed in Robo 9.
Hi Jack
Indeed I can confirm that at least my own copy (which is in trial mode) does not suffer the issue and works as expected.
Cheers... Rick ![]()
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7, 8 or 9 within the day! |
Kewl, Ricardo. Thanks!
North America
Europe, Middle East and Africa
Asia Pacific
Copyright © 2011 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).