Item11257: PublishPlugin keeps repeating index page after every topic in PDF mode
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
--
MarkCaveAyland - 16 Nov 2011
It seems that the current version of the
PublishPlugin will repeatedly publish the index.html page after every page when generating output in PDF mode.
After speaking to some developers on IRC, it transpires that the issue is that index.html is being added to the @files list once for each topic being published, and not just once for the entire document.
The provisional fix suggested by CDot was this:
--- PublishPlugin/file.pm.orig 2011-11-16 17:11:57.000000000 +0000
+++ PublishPlugin/file.pm 2011-11-16 17:13:38.000000000 +0000
@@ -79,7 +79,8 @@
binmode($fh);
print $fh $string;
close($fh);
- push( @{ $this->{files} }, $file );
+ push( @{ $this->{files} }, $file )
+ unless (grep { /^$file$/ } @{$this->{files}});
}
else {
$this->{logger}->logError("Cannot write $file: $!");
This seems to work in my tests here and so it would be great if this fix could be applied to the current codebase. In terms of further development, it may also be useful to add an additional parameter for publishing which would suppress generation of the index file altogether since it has very limited use for non-HTML generation.
Kind regards,
Mark.
Closed some time ago.
--
CrawfordCurrie - 27 Jul 2012