This question about Using an extension: Answered

GaugePlugin not working after upgrade to 1.1.6

I have recently upgraded Foswiki from version 1.1.3 to 1.1.6. After upgrade GaugePlugin does not display the gauges.

Gauge macros are rendered to URLs like http://my.site/pub/MyWeb/MyTopic/_GaugePlugin_tambar_t2.png?t=1355157572. When I open such URL in a browser, I get error page with the following text:

Attention

Attachment 'MyWeb/MyTopic/_GaugePlugin_tambar_t2.pngt=1355157572' does not exist

You are trying to access an attachment that does not exist.

I noticed that the question sign has gone, so the file name became invalid.

All gauge image files are created, but not displayed.

-- AlexanderSmishlajev - 10 Dec 2012

The same problem is with JHotDrawPlugin: rendered images are not displayed.

-- AlexanderSmishlajev - 11 Dec 2012

I've installed GD and GaugePlugin on my 1.1.6 test system and the example graphics on that page render fine.

Could you provide more details of where the url is rendered like that? Can you provide an example gauge macro that I can use to recreate the issue?

Thanks

-- GeorgeClark - 11 Dec 2012

I have created a test page at https://my.site/wiki/bin/view/Sandbox/TestGaugePlugin

(The site address is clobbered after the case was resolved.)

-- AlexanderSmishlajev - 12 Dec 2012

I think something strange is going on in your Apache configuration. I've pasted your example page verbatim into my local 1.1.6 system, and the ? is not removed from the message. I think that this actually has to be the case. pub files are not touched by Foswiki code.

The link:

<img src="https://my.site/wiki/pub/Sandbox/TestGaugePlugin/_GaugePlugin_tambar_t8.png?t=1355336058" alt="30" width="60" height="16"  />

is perfectly valid. The ?t=1355336058 part of the URL Param is simply a timestamp generated to make sure the browser does not cache the image.

I'm guessing that there is an apache rewrite rule that is not correctly handling a pub link with URL Parameters. /pub/... files are not handled directly by Foswiki unless they are rewritten to the viewfile script. ... at which point the ?t=xxxxxxx would need to be rewritten as an additional URL parameter ;t=xxxxxxxx

-- GeorgeClark - 12 Dec 2012

Yes! That was it: rewrite rule passed everything after the last slash as a query for viewfile script. The error has gone after the rule was changed to this:
 "^/wiki/pub/(.*?)/([^/?]+)(?:\?(.*))?$" => "/wiki/bin/viewfile/$1?filename=$2;$3"

Thank you very much for your help, George.

-- AlexanderSmishlajev - 12 Dec 2012
 

QuestionForm edit

Subject Using an extension
Extension GaugePlugin
Version Foswiki 1.1.6
Status Answered
Related Topics
Topic revision: r6 - 12 Dec 2012, AlexanderSmishlajev - This page was cached on 16 Oct 2018 - 22:50.

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