Reinstate missing image warnings in either generate.log or in a report

Summary

When generating a project, ePublisher used to include warning messages in the generate.log file for any referenced images that were not present in the source. Current versions of ePublisher (2009.3) do not output these messages any more and there is no other way to determine whether any images are missing. We need this functionality to QA our large generated doc set - please reinstate!

Detailed Description

When I used 9.2 and 2008.1, ePublisher would output [WARN] or [Warning] lines for any referenced images that were not present in the source when generating output. It appeared in the Splits pipeline. The following excerpt shows the output, taken from a 2008.1 generate.log file:

Processing pipeline 'Splits', 9 of 25.
[WARN] Image file not found 'C:\DocsrootS\source\BusinessSuite_Guide\Graphics\Chap1Graphic1.bmp'.
[WARN] Image file not found 'C:\DocsrootS\source\BusinessSuite_Guide\Graphics\Chap3Graphic1.GIF'.
Processing pipeline 'Copy', 10 of 25. 

After upgrading to 2009.3, I found this was no longer output, either in the generate.log file, or anywhere else.

Webworks Support has confirmed that this was removed from the product.

(I'm generating Webworks Help 5.0 but I think this is an issue common to any output format.)

Use Cases

If you are building a large doc set containing many books by multiple writers and utilizing a version control system like CVS or Subversion, it's easy for images to get lost in the mix. It's not practical to manually load each book in FrameMaker before each build to determine whether it has any missing images. It's also impractical to use a link checker to check the output (they typically have problems with Webworks Help 5 because it's so heavily controlled by Javascript).

Having this back in the generate.log would work.

It would also work to have this in the reports, either added to an existing one like the Links Report, or in a new report.

ePublisher really should provide messages on basic problems with output like this. I'm not sure why these have been classified as warnings in the past since you would never want to ship generated output with missing images.


:) :)) :( ;) :\ |) X-( B)
BenAllums   AFAIK, ePublisher continues to report missing images during processing, right up to the current ePublisher 2010.1 release.
2010-06-22 11:05:48
DaveTruman   Yes, but I believe you can see this only if you're generating the project from Express. If you're using Automap I don't believe this captured anywhere in the UI.
2010-06-22 12:22:21
BenAllums   That's true.  The warnings are not visible in the AutoMap UI.  They are reported in the AutoMap log file.
2010-06-28 13:22:31
DaveTruman   OK. I see that when you generate an Express project with Automap, there are two log files - the generate.log in the Express project's Logs dir, and a <jobname-log.txt> in the My Documents\..Automap..\Jobs\<jobname>\ folder. The content in the two logs looks basically identical, but I'll test whether the Automap one will show missing images.. Thanks!
2010-06-28 19:25:41
DaveTruman   I've just tested this in Automap (2009.3 on WinXP) and have attached the two log files generated. I set up a project-from-stationery, pointed it at FM9 source with 200+ missing images, and generated it. I don't see any missing image warnings in either log.
2010-06-29 08:24:18
BenAllums   That looks pretty indisputable to me Dave.  We'll check it out.  Thanks for your persistence.
2010-06-29 10:26:09
DaveTruman   Thanks, appreciate it Ben!
2010-07-06 18:47:38
BenAllums   Dave,

Sorry for the delay in responding.  I tracked this one down just prior to the 2010.2 release.

The change was made in:

Shared\common\splits\names.xsl

Problematic lines contain wwfilesystem:FileExists() calls in the 2010.2 code:

              <!-- Image file exists? -->
              <!--                    -->
              <xsl:if test="wwfilesystem:FileExists($VarByReferenceSourcePath)">

...

              <xsl:if test="($VarWIFAllowsByReference) and (wwfilesystem:FileExists($VarByReferenceSourcePath))">
               <xsl:attribute name="byref-allowed-by-wif">
                <xsl:value-of select="true()" />
               </xsl:attribute>
              </xsl:if>
              <xsl:if test="(($VarByReference) or ($VarWIFAllowsByReference)) and (wwfilesystem:FileExists($VarByReferenceSourcePath))">
               <xsl:attribute name="source">
                <xsl:value-of select="$VarByReferenceSourcePath" />
               </xsl:attribute>
              </xsl:if>

Those checks for wwfilesystem:FileExists() are the problem.  These were added to address an issue with Word documents where by-ref images were long gone, though it was possible to generate a useful output image based upon the cached copy within Word.

Short-term, you can just create an override for this transform and remove those FileExists() calls (but just those two).

Alternatively, you can also add a warning around line 327:

              <xsl:if test="($VarWIFAllowsByReference) and not(wwfilesystem:FileExists($VarByReferenceSourcePath))">
               <xsl:variable name="VarWarningMissingByRefImage" select="wwlog:Warning('Missing by-ref image ', $VarByReferenceSourcePath)" />
              </xsl:if>

2010-08-16 15:17:40
BenAllums   Follow up:

I'd actually recommend just adding a warning message rather than changing any of the existing code.  Much safer and it should address the original concern related finding out which images are missing.
2010-08-17 13:53:31
DaveTruman   Ben,
I added the warning message as you recommended, and it works great - thanks! I don't suppose this got added to 2010.2 did it (then I don't have to maintain it as an override)?

Here's what I did (2009.3), in detail, in case it's helpful to someone:

* Make a copy of Formats\Shared\common\splits\names.xsl and put in Shared\common\splits in your master project.
* Open names.xsl in a text editor, scroll down to line 327.
* Paste in Ben's code, be careful that it's between xsl statements.
* Save and you're done.

I'll paste in the code along with the statement above and below it so it's easy to see where it goes:
              <xsl:if test="(($VarByReference) or ($VarWIFAllowsByReference)) and (wwfilesystem:FileExists($VarByReferenceSourcePath))">
               <xsl:attribute name="source">
                <xsl:value-of select="$VarByReferenceSourcePath" />
               </xsl:attribute>
              </xsl:if>
              <!-- OVERRIDE, add warning to log for missing images - BenA, Sep1/10, http://tinyurl.com/375zoxt -->
              <xsl:if test="($VarWIFAllowsByReference) and not(wwfilesystem:FileExists($VarByReferenceSourcePath))">
               <xsl:variable name="VarWarningMissingByRefImage" select="wwlog:Warning('Missing by-ref image ', $VarByReferenceSourcePath)" />
              </xsl:if>
              <!-- end of OVERRIDE code                      -->
              <xsl:attribute name="path">
               <xsl:value-of select="$VarFramePath" />
              </xsl:attribute>

2010-09-01 19:57:05

Enhancements/Reinstate missing image warnings in either generate.log or in a report (last edited 2010-06-01 16:49:23 by DaveTruman)