Tags:
create new tag
view all tags

Question

Does PublishContrib support custom skins? What template files are required in order to allow publishing with customized templates? I have customized a single template file (view.myskin.tmpl) that inherits the properties of the PatternSkin templates, with some customized stuff. When I preview pages with this custom template, the pages appear just as expected. But when I pass this template as a "skin" to a publish command line, the results are blank pages with only empty paragraph tags.

Environment

TWiki version: TWikiRelease04x00x04
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RHEL4
Web server: apache2
Perl version: 5.8.5
Client OS: RHEL4
Web Browser: Firefox
Categories: Plugins, Skin

-- JohnDeStefano - 25 Oct 2006

Answer

ALERT! 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.

In addition, I seem to be having some trouble publishing after upgrading to. When I try to publish the generic TWiki web with a custom skin, I get the following perl errors regarding the PatternSkinPallette topic:

PatternSkinPalette:     not published: ***Cannot read /var/www/twiki/pub/Main/TWikiAdminGroup/PatternSkinPalette.css: No such file or directory***
 at /usr/lib/perl5/5.8.5/CGI/Carp.pm line 314
        CGI::Carp::realdie('***Cannot read /var/www/twiki/pub/Main/TWikiAdminGroup/Patter...') called at /usr/lib/perl5/5.8.5/CGI/Carp.pm line 385
        CGI::Carp::die('***Cannot read /var/www/twiki/pub/Main/TWikiAdminGroup/Patter...') called at /var/www/twiki/lib/TWiki/Contrib/Publish.pm line 478
        TWiki::Contrib::Publish::_copyResource('TWiki', 'undef', 'HASH(0xa68c0dc)', 'TWiki::Contrib::PublishContrib::file=HASH(0xa9d8a68)') called at /var/www/twiki/lib/TWiki/Contrib/Publish.pm line 379
        TWiki::Contrib::Publish::publishTopic('TWiki', 'PatternSkinPalette', 'TWikiAdminGroup', 'anon', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...', 'HASH(0xa68c0dc)', '', 'TWiki::Contrib::PublishContrib::file=HASH(0xa9d8a68)') called at /var/www/twiki/lib/TWiki/Contrib/Publish.pm line 288
        TWiki::Contrib::Publish::__ANON__() called at /var/www/twiki/lib/CPAN/lib///Error.pm line 379
        eval {...} called at /var/www/twiki/lib/CPAN/lib///Error.pm line 371
        Error::subs::try('CODE(0xa9f4394)', 'HASH(0xb623648)') called at /var/www/twiki/lib/TWiki/Contrib/Publish.pm line 294
        TWiki::Contrib::Publish::publishWeb('TWiki', 'TWikiAdminGroup', '.*', '', 'anon', 'view', '', 'TWiki::Contrib::PublishContrib::file=HASH(0xa9d8a68)') called at /var/www/twiki/lib/TWiki/Contrib/Publish.pm line 218
        TWiki::Contrib::Publish::publish('TWiki=HASH(0x9f7a304)') called at /var/www/twiki/lib/TWiki/UI.pm line 109
        TWiki::UI::__ANON__() called at /var/www/twiki/lib/CPAN/lib///Error.pm line 379
        eval {...} called at /var/www/twiki/lib/CPAN/lib///Error.pm line 371
        Error::subs::try('CODE(0xa9f1470)', 'HASH(0xa9a6da4)') called at /var/www/twiki/lib/TWiki/UI.pm line 158
        TWiki::UI::run('CODE(0xa1206cc)') called
I verified that the file
/var/www/twiki/pub/Main/TWikiAdminGroup/PatternSkinPalette.css
does not exist, and that there is no directory called TWikiAdminGroup in the pub/Main directory.

Also, the following error was thrown at the end of the publish job:

Templates Used = edit,oopsrev,view
Templates Specified = view
***WARNING: there is a difference between what you specified and what you needed. Consider changing the TEMPLATES setting so it has all Templates Used.***
Published to <a href="/twikihtml/TWiki">TWiki</a>{PublishContrib}{Dir}: /var/www/twikihtml
{PublishContrib}{URL}: /twikihtml
I didn't specify "view" as a template; I specified a custom template (called "anon") based on the pattern skin.

-- JohnDeStefano - 31 Oct 2006

PublishContrib just uses TWiki with the given skin to render pages, so if a page is rendered correctly in TWiki, it ought to be rendered correctly in the contrib. You don't say what format you are trying to publish in; eliminate some variables by publishing to HTML. I assume you checked that the file /var/www/twiki/pub/Main/TWikiAdminGroup/PatternSkinPalette.css actually exists?

-- CrawfordCurrie - 28 Nov 2006

I'm publishing to HTML. I mentioned above that the CSS file does not exist at that path; should it exist in the TWikiAdminGroup directory? It does exist here:

/var/www/twiki/pub/TWiki/PatternSkinPalette/PatternSkinPalette.css

It also gets copied to the "published" HTML tree:

/var/www/twikihtml/TWiki/rsrc/TWiki/PatternSkinPalette/PatternSkinPalette.css

-- JohnDeStefano - 28 Nov 2006

I suppose it's possible that one or more path in the published HTMl isn't being correctly converted to the publish area. Publish a page, view source, and make sure that the path to the css file is actually ointing at the published location.

-- CrawfordCurrie - 16 Dec 2006

No activity for over 30 days, closing this...

-- PeterThoeny - 01 Feb 2007

Change status to:
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-02-01 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.