You are here: Foswiki>Tasks Web>Item1161 (09 Mar 2010, GeorgeClark)Edit Attach

Item1161: GenPDFAddOn result in "Not Found" page

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release:
Applies To: Extension
Component: GenPDFAddOn
Branches:
Reported By: SebastianSchawohl
Waiting For:
Last Change By: GeorgeClark
After switching from TWiki 4.2 to Foswiki 1.0.0, GenPDFAddOn stopped working. I use the Foswiki's version of GenPDFAddOn and not TWiki ones.

When clickling on the "Generate PDF" link, I ended on that page :

Not Found

The requested URL /bin/genpdf/Main... was not found on this server.

I tried it on a clean install with only base plugins + GenPDFAddOn activated. The installation reports no errors, but GenPDFAddOn isn't showed as installed on configure page and "bin/genpdf" exists.

-- IngoKappler - 28 Feb 2009: I want to confirm the above statements. The extension is listed as Foswiki'd but following the installation instructions only leads to:

The requested URL /foswiki/bin/genpdf/Main/SitePreferences was not found on this server.=

This is also reflected in the apache log like this:

xx.xx.xx.xx - - [28/Feb/2009:01:50:19 +0100] "GET /foswiki/bin/genpdf/Main/SitePreferences HTTP/1.1" 404 320 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6"=

Running it directly from the shell results in:

/srv/www/foswiki/bin# ./genpdf
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>404 Not Found</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<h1>Not Found</h1><p>The requested URL  was not found on this server.</p>
</body>

I also installed the addon manually not using configure because in configure the addon never showed up as installed but without success. As of now and with no available solution the addon appears broken.

SvenDowideit__>   IngoK_, I think genpdf probably needs a switchboard entry

-- IngoKappler - 28 Feb 2009

The main answer is found in Item966 and the required switchboard entry in LocalSite.cfg is:

$Foswiki::cfg{SwitchBoard}{genpdf} =  [ 'Foswiki::Contrib::GenPDF', 'viewPDF' ];

Since configure is still not usable 2 entries must be added manually to LocalSite.cfg where the path to the htmldoc depends on the local setup and might be different from what is shown below:

$Foswiki::cfg{Extensions}{GenPDFAddOn}{htmldocCmd} = "/usr/bin/htmldoc";
$Foswiki::cfg{SwitchBoard}{genpdf} =  [ 'Foswiki::Contrib::GenPDF', 'viewPDF' ];

It is unclear why this SwitchBoard entry is not yet part of the documentation.

@George: Is it because of the experimental state in which this addon is still in?

-- IngoKappler - 28 Feb 2009

Hi IngoKappler, The version I released was supposed to not be experimental, and should have correctly built the config entries. The switchboard structure is new to Foswiki and I must have messed up the Config.spec file so that the entries are not automatically created. I thought that the version I uploaded was able to correctly create the required entries in LocalSite.cfg. Sorry about that.

I've been doing some more work to move GenPDF from an AddOn to a Plugin, so right now my local copy in SVN is in somewhat disarray. I'll try to get this one fixed in another checkout from SVN.

Turns out it was an unfortunate oversight. The Config.spec file was missing from the manifest. I've rebuilt the installers, tested and uploaded the updated version.

George

Hi George, thanks! smile

I re-installed and now see the entry for htmldoc in Extension section of configure but the switchboard entry was still not added to the LocalSite.cfg. So I think there is still something missing when installing. Basically 2 things appear still incomplete (broken):

  1. The switchboard entry in LocalSite.cfg is not added automatically.
  2. The addon is not correctly showing up under find more extensions from configure even when installaed via configure. The installed version is not listed.

Maybe this is to be added while making it a plugin.

-- IngoKappler - 01 Mar 2009

Hi IngoKappler,

I'm not sure what is going on with the Switchboard. It should not be visible in the bin/configure interface, but it should show up in the LocalSite.cfg file. In my local tests here, it is populated correctly. Just to be sure I removed all GenPDF files from a foswkiki 1.0.0 install, and re-installed from bin/configure including a fresh download. LocalSite.cfg did get the switchboard entry. What platform are you using?

Regarding display of the installed version in "Find More Extensions" - I believe that it's due to there not being a plugin topic. Not sure. I'll have to work on it in the next version. I've added this feedback to Item1174 to track it in the next version.

-- GeorgeClark - 14 Mar 2009

Hi George,

sorry for the late reply. I thought you are expecting something more from me (full genpdf re-install after cleaning it up) than just providing the platform but now I think the following answers it already:

Debian GNU/Linux (Lenny)

Please let me know in case you still like to get help regarding the Switchboard and I'll see how to fit it in.

-- IngoKappler - 08 Apr 2009

I'm going to close this. I suspect that this is more an issue with the use of configure. Even though configure doesn't show that anything has changed, the hidden switchboard entry is added internally and configure must be run through a save cycle. In my testing this has always added the hidden switchboard entry. If anything, configure should probably detect that hidden elements have been added and that a save is required.

-- GeorgeClark - 06 Jan 2010

As you've not closed this yet. I thought you might like some more feedback.

I could not install via configure the error being along the lines of "foswikibin/genpdf" not found to move genpdf. This suggests a faulty path setting or configure usage.

I eventually managed to run via the command line as follows:

C:\Program Files\Foswiki\Foswiki_1_0_8_pa>perl -T -I c:/PROGRA~1/Foswiki/Foswiki
_1_0_8_pa/bin GenPDFAddOn_installer.pl

### GenPDFAddOn Installer ###

This installer must be run from the root directory of your Foswiki
installation.
    * The script will not do anything without asking you for
      confirmation first (unless you used -a).
    * You can abort the script at any point and re-run it later
    * If you answer 'no' to any questions you can always re-run
      the script again later
Fetching the archive for Foswiki::Contrib::GenPDFAddOn.
Downloaded archive from http://foswiki.org/pub/Extensions to C:/Program Files/Fo
swiki/Foswiki_1_0_8_pa/GenPDFAddOn.tgz
    GenPDFAddOn_installer
    bin/
    bin/genpdf
    data/
    data/System/
    data/System/GenPDFAddOn.txt
    data/System/GenPDFAddOnDemo.txt
    data/System/GenPDFExampleHeaderFooterTopic.txt
    data/System/GenPDFExampleTitleTopic.txt
    htmldoc_force_header.patch
    lib/
    lib/Foswiki/
    lib/Foswiki/Contrib/
    lib/Foswiki/Contrib/GenPDF.pm
    lib/Foswiki/Contrib/GenPDFAddOn/
    lib/Foswiki/Contrib/GenPDFAddOn/Config.spec
    templates/
    templates/view.genpdf.tmpl
Archive unpacked
Install /data/System/GenPDFExampleTitleTopic.txt, permissions 0644
Install /data/System/GenPDFAddOnDemo.txt, permissions 0644
Install /templates/view.genpdf.tmpl, permissions 0644
Install /data/System/GenPDFAddOn.txt, permissions 0644
Install /lib/Foswiki/Contrib/GenPDF.pm, permissions 0644
Install /lib/Foswiki/Contrib/GenPDFAddOn/Config.spec, permissions 0755
Install /htmldoc_force_header.patch, permissions 0644
Install /bin/genpdf, permissions 0755
Install /data/System/GenPDFExampleHeaderFooterTopic.txt, permissions 0644

C:\Program Files\Foswiki\Foswiki_1_0_8_pa>

Running manually was not obvious, especially the -I option. I ran after updating the manifest to have a leading /.

-- JulianLevens - 08 Feb 2010

This is a different problem - the "not found" reported originally was due to the LocalSite.cfg switchboard entry not being set correctly. Your reported issue is with the plugin installer. I recreated the issue, but I don't believe it's with the plugin. I suspect now that the installer might be out of date - or there is some subtle issue in the manifest.

I'll open a new task. - Item8483 created.

-- GeorgeClark - 08 Feb 2010

ItemTemplate edit

Summary GenPDFAddOn result in "Not Found" page
ReportedBy SebastianSchawohl
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component GenPDFAddOn
Priority Normal
CurrentState Closed
WaitingFor
Checkins GenPDFAddOn:2080964ff5e1
ReleasedIn
Topic revision: r16 - 09 Mar 2010, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy