Tags:
create new tag
, view all tags

Question

I installed the FlowchartPlugin and i access it via http://192.168.0.56/twiki/bin/view/TWiki/FlowchartPluginExample and i can see the flow on the wikipage, but when i click one shape the generated code tries to redirect me to http://localhost/cgi-bin/twiki/bin/view/TWiki/FlowchartPluginExample#xtopic instead of http://192.168.0.56/twiki/b....ple#xtopic.

I didn´t be used perl before, but i found in /var/www/twiki/lib/TWiki/Plugins the file FlowchartPlugin.pm wich has the code ( lines 626 and so on ):

sub encaixaMapImg
{
..... 
.....
my $URL  = TWiki::Func::getViewURL( $web, $topic );
.....
.....
$mapImg .= ' <area href=" '.$URL.'#'.anchor ......

so i tried to change the my $URL assigment for:

my $URL  = TWiki::cfg{DefaultUrlHost}.TWiki::cfg{ScriptUrlPath}.'$web/$topic';

but the wiki page stills send me to localhost/cgi-bin

Thanks in advance

Environment

TWiki version: 4.1.2
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: CentOS 5
Web server: Apache 2
Perl version: perl 5.8.8
Client OS: xp and centos
Web Browser: ie and firefox
Categories: Plugins

-- LesterFajardo - 11 May 2007

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

You need to run configure and make sure your {DefaultUrlHost} setting matches your server. That's probably all you need to do.

-- CrawfordCurrie - 20 May 2007

I had the same problem and fixed it in the following way:

In the file FlowchartPlugin.pm, there is a line like: my $URL = TWiki::Func::getViewUrl( $web, $topic);

After that line, add the following line: $URL =~ s/http:\/\/localhost\/cgi-bin\/twiki/\/twiki\/bin/i;

You might have to make change 'http' to 'https' if you're on a secure server.

Also, it will only fix a flow chart that you save after you make this change.

-- AdrianHutchinson - 27 May 2008

 
Change status to:
Topic revision: r5 - 2008-05-27 - AdrianHutchinson
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.