This question about Using an extension: Needs followup in Tasks

PublishPlugin ignores VIEW_TEMPLATE

I'm trying to get PublishPlugin (Version: 6036 (2010-01-12)) to use a VIEW_TEMPLATE while publishing a topic (using Content Generator: file).

When running PublishPlugin to publish this particular topic (or the whole web containing this topic), I get the following debug output:
TestTopic21: has a VIEW_TEMPLATE 'TestTopic21View'
TestTopic21: Rev 1 published
TestTopic21ViewTemplate: Rev 1 published

However, the resulting HTML file is created without the content of the VIEW_TEMPLATE (when viewed in the wiki, the VIEW_TEMPLATE is used).

For the record: The topic TestTopic21 has the following content:
---+ !PublishContrib VIEW_TEMPLATE Test

<!--
   * Set VIEW_TEMPLATE = TestTopic21View
-->

And the VIEW_TEMPLATE (TestTopic21ViewTemplate) has the following content:
%TMPL:INCLUDE{"view"}%

<verbatim>
%TMPL:DEF{"contentheader"}%
__contentheader:__ _This topic uses a VIEW_TEMPLATE called TestTopic21ViewTemplate._
%TMPL:END%
%TMPL:DEF{"content"}%
__content:__ _This topic uses a VIEW_TEMPLATE called TestTopic21ViewTemplate._
%TEXT%
%TMPL:END%

</verbatim>

The HTML output is the following:
<h1><a name="PublishContrib_VIEW_TEMPLATE_Tes"></a> PublishContrib VIEW_TEMPLATE Test </h1>
<p />
<p />
<!-- <ul>
<li> Set VIEW_TEMPLATE = TestTopic21View?
</li></ul> 
-->
<p />
<p />
<p />
<hr />
<p />
<hr />
<p />
<p />
<p />
<pre>
</pre>

-- MartinKaufmann - 02 Feb 2010

fwiw, i am using VIEW_TEMPLATE in the meta preferences data, and it does work. for example:

%META:PREFERENCE{name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Set" value="ShowView"}%

-- WillNorris - 02 Feb 2010

Thanks! I found out that it's due to the skin I'm using for publishing. When using the standard basic_publish skin, the VIEW_TEMPLATE is ignored. However, when using plain skin it works (although it only works if VIEW_TEMPLATE is set using Set and not using Local, seeTasks.Item8466).

But then I get lots of error messages complaining about missing javascript files:
ERROR: /home/httpd/foswiki/pub/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.js?version=2.00 is not readable
ERROR: MISSING RESOURCE System/JQueryPlugin/plugins/foswiki/jquery.foswiki.js?version=2.00
ERROR: /home/httpd/foswiki/pub/System/JQueryPlugin/plugins/chili/jquery.chili.js?version=2.2 is not readable
ERROR: MISSING RESOURCE System/JQueryPlugin/plugins/chili/jquery.chili.js?version=2.2
ERROR: /home/httpd/foswiki/pub/System/JQueryPlugin/plugins/chili/jquery.chili.init.js?version=2.2 is not readable
ERROR: MISSING RESOURCE System/JQueryPlugin/plugins/chili/jquery.chili.init.js?version=2.2
ERROR: /home/httpd/foswiki/pub/System/JQueryPlugin/plugins/easing/jquery.easing.js?version=1.3 is not readable
ERROR: MISSING RESOURCE System/JQueryPlugin/plugins/easing/jquery.easing.js?version=1.3
ERROR: /home/httpd/foswiki/pub/System/JQueryPlugin/plugins/bgiframe/jquery.bgiframe.js?version=2.1.1 is not readable
ERROR: MISSING RESOURCE System/JQueryPlugin/plugins/bgiframe/jquery.bgiframe.js?version=2.1.1
ERROR: /home/httpd/foswiki/pub/System/JQueryPlugin/plugins/metadata/jquery.metadata.js?version=3630 is not readable
ERROR: MISSING RESOURCE System/JQueryPlugin/plugins/metadata/jquery.metadata.js?version=3630
-- MartinKaufmann - 04 Feb 2010

The problem is the ?version= string, I think. Needs a minor fix to Publish.pm. Please raise a task.

-- CrawfordCurrie - 15 Feb 2011

QuestionForm edit

Subject Using an extension
Extension PublishPlugin
Version Foswiki 1.0.9
Status Needs followup in Tasks
Topic revision: r5 - 15 Feb 2011, CrawfordCurrie - This page was cached on 12 Jan 2018 - 18:36.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License