1 Reply Latest reply on Dec 13, 2007 5:30 AM by anubisascends

    Workaround for the RH7 "Unable to add image" problem

    Kathy313 Level 1
      I’ve not been the only person to come across this problem in recent weeks, but have tinkered around enough to come up with a workaround or two.

      First, let’s define where the problem is occurring.
      Disclaimer: I have not tested all flavors of RH7 authoring. My use is limited to RoboHelp7 for HTML, in a project set up for HTMLHelp output.

      When you want to add an image, you get the following dialog, right? Here’s the default Insert Image dialog:

      Then, if the image you want has not yet been used in your project, you need to navigate to go find it, right? Click the little folder icon and the Select Image File (aka the “browse” dialog) displays:

      Locate and select the desired file and click Open. Here is where the bug is occurring: some images can be selected and others seemingly cannot. (Symptom: the image file name is not returned, and there is no image preview shown.) It’s the files with the “too long” physical filepath names that are not being carried back to the previous Insert Image dialog.

      Second, let’s verify the operation of the Insert Image dialog.

      Click any image that is already listed, and the file name goes up to the Image Name field at the top of the screen. In my help project I have one folder for topic files and another folder for image files. So I’ve selected All Folders in this example to display all the file names that have already been used elsewhere in the project:

      Select a file from this list, the Image Name field is populated….

      …and the resulting IMG tag looks like this:

      So, there is nothing wrong at all with the Insert Image dialog.

      Ok, time for the workaround.
      But maybe you can already guess what that might be? I have two ideas, actually, both based on the premise that the IMG tag is a relative reference and does not care where the physical filepath points to or how many characters it is.

      *** Temporarily, select the “wrong” file name to complete the Insert Image operation and create the IMG tag. (It’s already been added to the project, and we’ve proven that the Insert Image dialog works correctly. So this workaround takes advantage of that.) Then switch over to HTML view for your topic, and manually retype in the correct file name into the IMG tag. This is easier if both file names are in the same folder, then you don’t have to fuss with the other subfolder names in the IMG tag file path.

      *** Prior to using the “too long” name in the project, switch over to Windows Explorer and rename the file to something very short. Like x.jpg. (This is, of course, assuming that the rest of the physical filepath name itself does not exceed the character length on which the Select Image File dialog fails.) Go back to RH7 and use the Insert Image dialog to add this file into your topic. Save the topic. Locate the image in the Project Manager pod and rename the image file to what it is “supposed to be”. Save all.

      With either workaround, the image with the “too long” filepath displays correctly, and the CHM output will compile successfully too. I conclude that the Insert Image dialog works just fine, and that the bug is limited to only the Select Image File dialog.