14 Replies Latest reply on Aug 29, 2007 2:11 PM by robowriter

    RH inserting unknown code after generating

    Kerber8
      I've created a Webhelp project in RH 5.0. I'm a Robohelp novice, but have been working on this project for quite awhile with no problems, and have generated it multiple times. I recently created and applied a conditional build tag to some of the topics in order to generate a version 1 only layout of the help. After generating, I noticed some issues.

      In WYSIWYG view, the topics with the V1 tag now have numerous problems:
      1. small red boxes (look like a solid red checkbox) appear, which indicate where RH inserted some type of code (seemingly javascript but I'm unsure whether that's true in every case-I've included a sample at end of this message)
      2. some text-only popups seem to have been deleted (I found a previous message thread that mentioned the relative link to the ehlpdhtm.js file, but I "think" mine is okay)
      3. some of my in-line icons seem to have had a <noscript> tag added to them, which causes a line break right after the icon image

      In View mode, the red boxes do not appear, but the text popups do not work and the line breaks are apparent next to the inline images. None of the problems occur with topics that do not have the V1 tag applied. Therefore, I tried regenerating the project after removing the V1 tag, and the problems are still apparent on the same topics as before.

      While time consuming, I can go through and correct these issues (I assume), but I'd sure like to know what caused the problems in the first place, especially if there's a risk that it's going to happen every time I generate. Thanks for clues any of you might have.

      Sample script that RH inserted (red box appears in WYSIWYG):

        • 1. Re: RH inserting unknown code after generating
          robowriter
          This probably won't help, but since nobody else has responded, I'll tell you about a client of mine who sent me RoboHelp source files that I was supposed to edit. Those files displayed the red boxes representing javascript code.

          Turned out that they had sent me generated files, rather than source files. Cleanup was possible, but very time-consuming.

          Is there any possibility that, when you generated the files, you output them to the folder where you keep your source files? I'm not sure if RoboHelp would even let you do this, but it's the only thing I can think of.

          If this is the case, you might have wiped out your source files, and cleaning the generated files to convert them into source files might be the only alternative. On the brighter side, you'd only have to do this once because you'd make sure your output went to a separate folder.

          Just a remote possibility, but worth a shot. I hope this is of some help to you.
          • 2. Re: RH inserting unknown code after generating
            RoboWizard Level 4
            Hi all

            I would agree with robowriter in the thought that these are output files co-mingled with source files. How this happens is often a mystery. But I'll toss out one way it can happen. The Publishing process! Keep in mind that the whole purpose for existing for the Smart Publishing Wizard is to copy files from one location to another. It doesn't care if they already exist or not. It also has no way of knowing it shouldn't replace source files with output files. to the wizard, it's simply replacing one HTM file with another of the same name.

            If this is the case, I have documented some steps that can be of assistance in the cleanup process. You may read them by clicking here.

            Cheers all... Rick
            • 3. Re: RH inserting unknown code after generating
              Kerber8 Level 1
              Thanks so much to you both, Robowriter and Rick. I thought perhaps my message had gone into a black hole somewhere. :]

              I suspected after doing some more research and trying to re-create my final steps before the problem occurred that I had somehow overwritten my source files. I think in this particular case, I published right on top of them. I was eventually able to clean up all of my topics, and I've seen no further problems.

              Again, thanks for your responses. My first RH project - good learning experience!

              Keri
              • 4. Re: RH inserting unknown code after generating
                robowriter Level 1
                Hi, Keri. I'm glad I got it right, but sorry you'll have to go through the cleanup process.

                Rick, this brings up the possibility for a feature request, but I think you might have more luck getting it implemented than I would. Very simply: have RoboHelp compare output folder with source folder at generation time. If they're the same, issue an error message stating that the output and source folders cannot be the same. (If they want to get fancy, they can offer a Browse button that displays a Save As-type dialog so the user can re-select the output folder.) At a minimum, though, doing the comparison and issuing an error message should be an easy programming job. This probably should have been fixed years ago.

                Carol
                • 5. Re: RH inserting unknown code after generating
                  Captiv8r Adobe Community Professional & MVP
                  Hi Carol

                  I know you think I'd stand a better chance of seeing a feature added or changed. But you would be wrong.

                  What really speaks to the development team of all Adobe products is the sheer volume of Feature Requests that are received. While it may be true that I've had personal conversations with some of the developers over a meal, this doesn't really make me more credible or important than you when it comes to something like this.

                  So for anyone wanting to influence a change, I cannot stress enough how important it is to add your voice to the collective by clicking here and filling out the form.

                  As for a warning, there does exist a warning when you try to coax RoboHelp into Generating files into the source location. (Remember, Generating is an entirely different animal than Publishing is)

                  Cheers... Rick
                  • 6. Re: RH inserting unknown code after generating
                    robowriter Level 1
                    Thanks, Rick. I'll definitely use that link to put in the request, but I hope you, Keri, and anyone else reading this thread will do it, too. As I understand it, then, I should specify that an error should occur when publishing a project.
                    • 7. Re: RH inserting unknown code after generating
                      Kerber8 Level 1
                      Thanks for suggesting a feature request, Carol, and I will indeed submit one to Adobe. I think a warning would have been quite helpful.

                      Thanks again to you both.
                      Keri
                      • 8. Re: RH inserting unknown code after generating
                        sudro2
                        I've inherited a similar project at my company. At some point in the past, it looks like someone took the generated files from the web server to update them. As a result, all 400 odd topics have various scripting all over the place.

                        Here's my question though: has anyone reported that working on these files causes any instability? I've been going through and stripping out the script tags as recommended by Rick Stone, but I'm finding that I have to do all of them in the TrueCode editor. If I try to simply delete the little red boxes a dialog pops up telling me that "RoboHelp has generated errors and will close" (or words to that effect). I guess it seems pretty straightforward that that's what's causing the problem, but if anyone has further insight or suggestions that will make the process any quicker it'll help me a lot.
                        • 9. Re: RH inserting unknown code after generating
                          robowriter Level 1
                          I’m no techy, but I’m guessing that deleting the red boxes from WYSIWYG view misses some of the javascript.
                          I don’t think you can use multi-file search and replace for this, so I’ll tell you how I did it.
                          First, I popped in some really good, peppy music and put on my headphones. Then, starting with the first topic, I opened each topic in WYSIWYG view, highlighted the red box, switched to True Code, where the errant code was also highlighted. Then I deleted it, making sure I got the whole block of code. It didn’t take as long as I thought it would, but it wasn’t my finest tech writing moment, either.
                          Hopefully, Rick can offer you a magic wand (like a way to use search and replace to do it). I’d sure like to know a better way, myself. With clients handling part of some of my help systems, it’s always possible that this could happen again.
                          Good luck!

                          Carol
                          • 10. Re: RH inserting unknown code after generating
                            robowriter Level 1
                            I'm not a total techy, but I'm guessing that deleting the red box in WYSIWYG view does not get rid of the entire JavaScript. I wish I could tell you that you could do a search and replace, but I don't think it's really possible.

                            What I did was use WYSIWYG view to find the red box, highlight it, and then go to True Code, where the code will also be highlighted, to delete it. I can say that I never got any error like the one you described when I did it this way. I checked every topic in my project (several hundred of them), and used this approach, but only after I popped in a good CD and put on my headphones. I won't say it was painless, but it didn't take as long as I thought it would.

                            Hopefully, Rick can offer a magic wand that will speed up the process. I'd love to know about it!

                            Carol
                            • 11. Re: RH inserting unknown code after generating
                              robowriter Level 1
                              I’m no techy, but I’m guessing that deleting the red boxes from WYSIWYG view misses some of the javascript.
                              I don’t think you can use multi-file search and replace for this, so I’ll tell you how I did it.
                              First, I popped in some really good, peppy music and put on my headphones. Then, starting with the first topic, I opened each topic in WYSIWYG view, highlighted the red box, switched to True Code, where the errant code was also highlighted. Then I deleted it, making sure I got the whole block of code. It didn’t take as long as I thought it would, but it wasn’t my finest tech writing moment, either.
                              Hopefully, Rick can offer you a magic wand (like a way to use search and replace to do it). I’d sure like to know a better way, myself. With clients handling part of some of my help systems, it’s always possible that this could happen again.
                              Good luck!

                              Carol
                              • 12. RH inserting unknown code after generating
                                robowriter Level 1
                                So, in spite of the fact that the website was just sitting there, and it didn't seem to accept any of my solutions, and at one point it said that it was down for maintenance, it looks like they all got through!

                                Carol
                                • 13. Re: RH inserting unknown code after generating
                                  HKabaker Level 2
                                  At least you had a chance to polish your prose.
                                  (wink)
                                  H
                                  • 14. Re: RH inserting unknown code after generating
                                    robowriter Level 1
                                    I did like the second (and third) version better. Listening to music was higher on the list of priorities the second time I wrote it.