Subject: [Pkg-cacti-maint] Bug#702690: Fwd: Problem exists in 0.8.8b+dfsg-8+deb8u6

From: Matthias Vierthaler <[email-masked]>
Date: Mon, 2 Jan 2017 14:48:00 +0100

Hello guys!

The problem still exists in 0.8.8b+dfsg-8+deb8u6 on jessie 8.6 as well.

I tried installing libjs-jquery-cookie, libjs-jquery was already installed.
The trees cannot be expanded/collapsed - a big list is shown - see
attachement.

The workaround is to create a symbolic link to the javascript libraries:
ln -s /usr/share/javascript/ /usr/share/cacti/site/javascript

The original problem is:
when I open the tree page and look at the firebug console it shows:
"NetworkError: 404 Not Found - https://HOSTNAME/javascript/jq
uery-cookie/jquery.cookie.js"
"NetworkError: 404 Not Found - https://HOSTNAME/javascript/jquery/jquery.js"
"NetworkError: 404 Not Found - https://HOSTNAME/javascript/jq
uery-cookie/jquery.cookie.js"
ReferenceError: jQuery is not defined
ReferenceError: $ is not defined

Unfortunately there is no javascript folder inside /usr/share/cacti :/ ...
only /usr/share/cacti/site/include/js - could it be that the wrong path is
used here? The js file can be found here
/usr/share/javascript/jquery-cookie/jquery.cookie.js
-> a link solves the problem, see above.

Similar problem is discussed here [1] - but this is on redhat.

The problem is also discussed here [2] but I have neither of those plugins
in use.

What shall we do about that? Add that link per default?

Kind Regards,
Matt

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1004548
[2] http://forums.cacti.net/viewtopic.php?f=21&t=50775

---

From: Paul Gevers <[email-masked]>
Date: Mon, 2 Jan 2017 20:57:16 +0100

Hi Matthias,

> ln -s /usr/share/javascript/ /usr/share/cacti/site/javascript

Looks like your setup doesn't have javascript-common properly installed
and/or configured.

> Unfortunately there is no javascript folder inside /usr/share/cacti :/
> ... only /usr/share/cacti/site/include/js - could it be that the wrong
> path is used here? The js file can be found here
> /usr/share/javascript/jquery-cookie/jquery.cookie.js -> a link solves
> the problem, see above.

As does enabling the javascript-common configuration in your web server.

> What shall we do about that? Add that link per default?

Configure javascript-common.

Paul