SID-01699: PublishWebPlugin not rendering attachments list
| Status: |
Answered |
TWiki version: |
pre-4 |
Perl version: |
5.8.8 |
| Category: |
PublishWebPlugin |
Server OS: |
Fedora Core 5 |
Last update: |
12 years ago |
I've got
PublishWebPlugin working on my TWiki instance -- it generates the HTML and copies inline graphics to the publish directory quite nicely. However, when a page includes an attachments table (that is, a list of attachments not embedded in the page, like a PDF) it doesn't render the table, and doesn't copy the attachments.
I've been using a variant of the pattern template to do the export, and it has the code necessary to render the attachments table, but to no avail. Anyone know if it's possible to get this plugin to export non-embedded attachments?
One thing to note is that I'm using this to export a Cairo instance. The latest version of the plugin wouldn't work with it, so I'm using the last 2006 revision. I'm not planning to upgrade because the point of this exercise is to shut down the instance.
--
Susan Salituro - 2013-05-08
Discussion and Answer
The plugin does not work on Cairo because it uses
TWiki::Func::registerTagHandler() and
TWiki::Func::getContext() that were added in Dakar release. You could comment out the
TWiki::Func::getContext() and use the
commonTagsHandler() callback instead of
TWiki::Func::registerTagHandler(). However, I am not sure if this solves the attachment table issue.
So far there was no need to publish attachment tables with attachments; however, attachments that are referenced in the body text are handled properly.
You could enhance the plugin to support attachment tables as well. Or you could support the community and
hire a consultant to do that for you.
--
Peter Thoeny - 2013-05-08
I was able to get the plugin to support attachment tables (we needed this because there were some pages with attachments that were not referenced in the text) by examining what the main TWiki rendering code in Attach.pm was doing. Once the table was rendered, the plugin's attachment copying code did the rest of the work. It's kind of a hack, so I don't necessarily want to roll it into the plugin, especially since it sounds like the community hasn't needed it up to now.
Thanks for your help, Peter!
--
Susan Salituro - 2013-05-16
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.