Skip navigation
Currently Being Moderated

RH10 Corrupts Bookmark Links on Drop-down Text Link

Jul 26, 2012 12:15 PM

I've noticed that when upgrading RH9 projects to RH10, that RH10 will corrupt (e.g., "Broken Link") all bookmarks set on a drop-down text link. For example, I have a head "Changing the Status in PowerFlow" which when clicked, drops-down a chunk of text. The head is also included as a bookmark, "Changing_the_Status_in_PowerFlow".

 

These all worked perfectly in RH9 and I've tested the upgrade to RH10 multiple times with the exact same outcome. Bookmarks not associated with drop-down text are unaffected. Note the three MM-4000 broken links, which are associated with drop-downs; there is a fourth bookmark, not associated with a drop-down link, that is accessible:

 

Broken Links.jpgBroken Links 2.jpg

RH10 inserts a "#" into the bookmark link, producing a "The filename is invalid. The "#" character cannot be used in a path." error. The bookmarks no longer show up in Project Files, but do show on the topic page (with highlighting) and in the bookmark dialog, but the bookmark on the page does not get selected -- as normal -- in the bookmark dialog.

 

When compiled as a WebHelp project, the bookmarks work as expected. I'm not sure what the correct syntax is for a legit bookmark, and searching for "#Changing..." and deleting the "#" removes the selection from the Broken Links list, but changes no other behavior.

 

If anyone has any other fixit ideas, I'd be appreciative: I have hundreds of these throughout multiple projects. Thanks...

 
Replies
  • Currently Being Moderated
    Jul 30, 2012 11:56 AM   in reply to Flaven

    Ross

     

    I just created a dropdown in a Rh9 project and bookmarked it. In another topic I created a link to the bookmark and tested it. It worked as expected.

     

    Then I upgraded the project to Rh10 and it still worked.

     

    Are you able to create a new project in Rh9 and test the upgrade with that?

     


    See www.grainge.org for RoboHelp and Authoring tips

     

     

    @petergrainge

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 30, 2012 12:19 PM   in reply to Flaven

    If you're happy with it, I'm happy. Will keep this in mind if anyone else posts.

     


    See www.grainge.org for RoboHelp and Authoring tips

     

     

    @petergrainge

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 30, 2012 9:35 PM   in reply to Flaven

    hi Flaven,

     

    Can you please share project so that RoboHelp team can look into the issue, you can upload the project @ acrobat.com and share it with me praful@adobe.com

    this way the RH team will take a better look at the issue and provide some solution to the community.

     

    thanks

    Praful

    Adobe RoboHelp team

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 5:16 AM   in reply to Flaven

    hi Flaven,

    I downloaded the project file, and looked at the issue. The issue is very specific, just to let all the other people aware, the issue, if you create a DHTML text (dropdown or expanding), and then on that DHTML text you apply bookmark, then upgrade the project to RH10, the bookmark does not appear.

     

    The same is the case if you create a new project in RH10 and add bookmark to DHTML text, then bookmark does not appear in the project mgr pod.

     

    I have a fix for this issue, the fix is to run a script which is shared @ https://acrobat.com/#d=iwwPZbRDHT-oJ1gSp6Kc6w

    you need to follow the following steps

    • Download the script file.
    • Open RoboHelp project, click View>pod>script Explorer
    • in the script explorer, right click and select import and select the downloaded script file.
    • Take backup of your project where DHTML issue is happening.
    • Open the project, open the script explorer pod, right click on the new script file and select run.
    • the script will fix the whole project and all the bookmarks will start working fine.

     

    The script is just a workaround, till the time RoboHelp engineering team fixes this issue,

     

    thanks

    Praful Jain

    Adobe RoboHelp team

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 5:38 AM   in reply to Praful_Jain

    Good job, Praful!

     

    Question on this. Does the script only need to be run once? Or will it need to be run repeatedly after a specific set of events?

     

    Cheers... Rick

     

    Helpful and Handy Links

    RoboHelp Wish Form/Bug Reporting Form

    Begin learning RoboHelp HTML 7, 8 or 9 within the day!

    Adobe Certified RoboHelp HTML Training

    SorcerStone Blog

    RoboHelp eBooks

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 6:07 AM   in reply to Captiv8r

    Like I said earlier, this is just a workaround not a complete fix, if you are creating bookmarks on DHTML text only then you need to run this script. otherwise bookmarks are working fine, so most of the users will not require this script.

    Also if you want to add bookmark to DHTML text, better to add bookmark before the start of the text, instead of on the DHTML text, then script is not required.

    the issue occurs only when bookmark and DHTML text are overlapping.

     

    thanks

    Praful Jain

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 10:32 PM   in reply to Flaven

    Thanks for the confirmation, I always think Extendscript to be an extension to RoboHelp. We can extend RoboHelp and come up with many new features using extendscript feature.

     

    Please mark the forum link as answered so that community can get direct answer to the problem.

     

    thanks

    Praful Jain

    Adobe RoboHelp Team

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 23, 2013 7:06 AM   in reply to Praful_Jain

    Hi--I am now having this problem. I wanted to download the script, but the link provided does not lead there.

    Is there an alternate link?

    Thanks, Cara

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 23, 2013 9:19 AM   in reply to Cara Bereck Levy

    I am on the case.

     


    See www.grainge.org for RoboHelp and Authoring tips

     

     

    @petergrainge

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 24, 2013 5:46 AM   in reply to Peter Grainge

    Thanks, Peter

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 25, 2013 10:13 PM   in reply to Cara Bereck Levy

    Seems like the script URL has changed a bit due to changes in acrobat.com the new URL is

    https://workspaces.acrobat.com/?d=iwwPZbRDHT-oJ1gSp6Kc6w

    Please follow the steps provided above in the post to run this script.

     

    Thanks

    Praful Jain

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 28, 2013 4:45 AM   in reply to Praful_Jain

    Can you hear me cheering over there? Worked like a charm--THANKS!!!

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 28, 2013 7:34 AM   in reply to Cara Bereck Levy

     


    See www.grainge.org for RoboHelp and Authoring tips

     

     

    @petergrainge

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 28, 2013 8:35 PM   in reply to Cara Bereck Levy

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 27, 2014 9:14 PM   in reply to Praful_Jain

    Since workspaces.acrobat.com is retiring soon, placing the (above) refered file here itself:

     

     

    ---------------------------------------------------------

     

     

     

    /********************************************************************* **************************************

    * $$FileName                    Fix DHTML bookmark issue in RH10.jsx

    *

    * $$Description                    In RH10, DHTML text with bookmark information is not coming up fine in project manager pod. this script fixes the issue

    *

    * Author                              Praful Jain

    *

    * Copyright (c) 2012 Adobe Systems Incorporated. All Rights Reserved.

    ********************************************************************** **************************************/

     

     

    main();

    function main()

    {

              //check if the project is open or not

              if(RoboHelp.project != undefined )

              {

            if(IsRoboHelp10())

            {

                DoWork ();

            }

                        else

                        {

                                  alert("This script is written for RH10 users only");

                        }

              }

              else

                        alert("Open Project and then run the script");

    }

     

     

    function msg(szString)

    {

              RoboHelp.project.outputMessage (szString);

    }

     

     

    function IsRoboHelp10() {

        //get the RoboHelp version

        var versionString = RoboHelp.version;

        var iVersion = parseInt(versionString);

        return (iVersion == 10);

    }

     

     

    function DoWork()

    {

              msg("\nTraversing the project.............\n");

              //parse though every thing and count the words

              var tpMgr = RoboHelp.project.TopicManager;

              var snpMgr = RoboHelp.project.SnippetManager;

              msg("****************Started Traversing Topics now*********************\n");

              TraverseManager(tpMgr,true);

              msg("****************Started Traversing Snippets now*********************\n");

              TraverseManager(snpMgr,false);

              msg("*********************************************************** ***************************\n");

              msg("Fixed the whole project\n");

    }

     

     

    function TraverseManager(mgr,bTopic)

    {

              var nCount = 0;

              for(var index=1;index<=mgr.count;index++)

              {

                        //for each item, get the file path

                        var file = mgr.item(index);

                        var filename;

                        if(bTopic)

                                  filename = file.filename;

                        else

                                  filename = file.name + file.extension;

                        PatchTopicForDHTMLBookmark(file.path,filename);

              }

    }

     

     

    function PatchTopicForDHTMLBookmark(filepath,filename)

    {

              msg('Travsersing File '+filename+'\n');

        var bBodyFound=false;

              //we need to get token Manager

              var nCount = 0;

              var tknmgr = RoboHelp.getTokenManager (filepath);

              var bSave=false;

     

              var token = tknmgr.item(1);

              while (isValidType(token))

              {

            if(token.tokenType == RoboHelp.TokenType.TOKENXMLPI )

            {

                                  var strTokenName = token.name;

                                  var strTokenLowerCase=strTokenName;

                                  strTokenLowerCase = strTokenLowerCase.toLowerCase();

                                  if(strTokenLowerCase.search("<?rh-dropspot_start")!=-1 || strTokenLowerCase.search("<?rh-expandspot_start")!=-1)

                                  {

                                            var startIndex = strTokenLowerCase.indexOf("name=\"");

                                            if(startIndex!=-1)

                                            {

                                                      var endIndex = strTokenLowerCase.indexOf('"',startIndex+6);

                                                      if(endIndex!=-1)

                                                      {

                                                                var lenBookmark = endIndex - startIndex-6;

                                                                var strBookmarkName=strTokenName.substr(startIndex+6,lenBookmark);

                                                                if(!isEmptyString(strBookmarkName))

                                                                {

                                                                          //we need to create a new bookmark before this and delete this name attribute

                                                                          var strNewTokenText = strTokenName.substr(0,startIndex);

                                                                          strNewTokenText += strTokenName.substr(endIndex+1);

                                                                          var strBookmarkHTML = '<a name="'+strBookmarkName+'"></a>'+strNewTokenText;

                                                                          token.insertText(strBookmarkHTML,f alse);

                                                                          token.delete();

                                                                          bSave = true;

                                                                }

                                                      }

                                            }

                                  }

            }

                        token = token.next;

              }

              if(bSave)

              {

                        msg('\t\tFixed DHTML bookmarks in file '+filename+'\n');

                        tknmgr.save();

              }

              tknmgr.close();

              return nCount;

    }

     

     

    function isValidType(value) {

        if (typeof (value) !== 'undefined' && value != null) {

            return true;

        }

        return false;

    }

     

     

    function isEmptyString(szString) {

        var bRetVal = true;

        if (isValidType(szString)) {

            szString = trim(szString);

            bRetVal = szString.length == 0;

        }

        return bRetVal;

    }

     

     

    function trim(szString) {

        return szString.replace(/^\s+|\s+$/g, "");

    }

     

     

     

     

    ---------------------------------------------------------

     

     

    ~Amit Agarwal

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points