[SOLVED] /cacti/plugins/mactrack/plugins/mactrack/...

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
manahmanah
Posts: 11
Joined: Tue Mar 07, 2006 9:06 am

[SOLVED] /cacti/plugins/mactrack/plugins/mactrack/...

Post by manahmanah »

Hello,

after I solved a problem with graphs (see http://forums.cacti.net/viewtopic.php?t=12333 )
now it happens that after I clicked once on any of the mactrack menu items,
e.g. Device Tracking -> Sites, the results are displayed correctly, but a /plugins/mactrack/ gets appended to the base url ofthe relative links,
i.e. for Tracking Utilities (href='plugins/mactrack/mactrack_utilities.php') the link points to http://mycacti/cacti/plugins/mactrack/p ... lities.php

Where does cacti (or mactrack plugin) sets the base for the relative urls?

Sorry for the mess :)
GNU/Linux Debian sid 2.4.27-2-686-smp on Intel ISP2150
cacti 0.8.6h-2 | cacti-cactid 0.8.6g-2 | plugins: thold 0.2.7, mactrack
MySQL 5.0.18-7 | Apache 1.3.34-2 | PHP 4.4.2-1 | rrdtool 1.0.49-1 | perl 5.8.8-2
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Check your /include/config.php for the variable
$config['url_path']
which in your case should be set to
$config['url_path'] = '/cacti/';

That should hopefully fix it for you.
manahmanah
Posts: 11
Joined: Tue Mar 07, 2006 9:06 am

Post by manahmanah »

Hi cigamit,

yes, in my /include/config.php there is already
$config['url_path'] = '/cacti/';

and I didn't found any other assignment for $config['url_path']
in /include/*, /lib/* or /plugins/mactrack/*

But maybe I didn't explain sufficiently my problem:
- HTML code is always generated OK
- links starting with / (src="/cacti/images/cacti_logo.gif") are always OK
- links NOT starting with / (href='plugins/mactrack/mactrack_devices.php') are OK just after clicking the Console Tab (browser points to http://mycactisite/cacti/plugins/mactra ... evices.php) but once I clicked one of the mactrack menu items the new page has WRONG links
(like http://mycactisite/cacti/plugins/mactra ... evices.php)

So question is: how browser decides what is the base url, and why does it change it after accessing mactrack pages?
In the HTML page source I don't se anything weird, and the behaviour happens both with Firefox and IE.
GNU/Linux Debian sid 2.4.27-2-686-smp on Intel ISP2150
cacti 0.8.6h-2 | cacti-cactid 0.8.6g-2 | plugins: thold 0.2.7, mactrack
MySQL 5.0.18-7 | Apache 1.3.34-2 | PHP 4.4.2-1 | rrdtool 1.0.49-1 | perl 5.8.8-2
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Try overriding your /lib/functions.php with the pre-patched version from the Plugin Architecture. It is that file that uses $config['url_path'] to proper setup the links.
manahmanah
Posts: 11
Joined: Tue Mar 07, 2006 9:06 am

Post by manahmanah »

It worked.

Thank you!
GNU/Linux Debian sid 2.4.27-2-686-smp on Intel ISP2150
cacti 0.8.6h-2 | cacti-cactid 0.8.6g-2 | plugins: thold 0.2.7, mactrack
MySQL 5.0.18-7 | Apache 1.3.34-2 | PHP 4.4.2-1 | rrdtool 1.0.49-1 | perl 5.8.8-2
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests