Nector Save error

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

a2287884
Posts: 10
Joined: Thu Jun 11, 2009 4:03 am
Contact:

Nector Save error

Post by a2287884 »

Hi,

i am not able to save items in nector, what is missing.
Attachments
nector.JPG
nector.JPG (124.4 KiB) Viewed 4794 times
123ralle
Posts: 15
Joined: Wed Dec 20, 2006 7:32 am

Post by 123ralle »

Hi,

which version of cacti and nectar are you using?

I've had the same problem after upgrading to cacti 0.8.7f, which is currently
retired.

regards,
Ralf
a2287884
Posts: 10
Joined: Thu Jun 11, 2009 4:03 am
Contact:

Post by a2287884 »

cacti 8.7f
nectar 0.26
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

ATM, please downgrade to 087e :cry:
R.
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please also post the error in your Cacti Log for the save. Looks to me that there is a problem with the plugin.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

I'm getting the same error with version cacti 0.87g

firebug report an error when attempting to add a report

document.getElementById("cformat") is null

http://missnetmon/cacti/plugins/nectar/ ... ab=details

Line 87

The above would be located in file nectar_webapi.php

$save["cformat"] = (isset($_POST["cformat"]) ? "on" : "");


thxs
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please try attached nectar 0.28 beta1
Please copy nectar/0.8.7g/html_utility.php to lib/html_utility.php. This patch will be included in next cacti087g
R.
Attachments
nectar-028b1.tgz
Please copy nectar/0.8.7g/html_utility.php to lib/html_utility.php
(58.58 KiB) Downloaded 170 times
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

Hi I found a small glitch

Code: Select all

function nectar_version () {
	return array(
		'name' 		=> 'nectar',
		'version' 	=> '0.28 beta1',
		'longname'	=> 'Send Graphs via EMail',
		'author'	=> 'Reinhard Scheck',
		'homepage'	=> 'http://docs.cacti.net/plugin:nectar',
		'email'		=> 'gandalf@cacti.net',
		'url'		=> 'http://docs.cacti.net/plugin:nectar'
		);
}
in the code above the portion of version = '0.28 beta1' , if left as is, the plugin won't show up in the plugin management list, once I changed to 0.28 only it was visible again.

Thought you might want to know
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

I'm still getting the Field save error when I try to Add a new report

same error detected by firebug as above...

Code: Select all

document.getElementById("cformat") is null 

http://cactiserver/cacti/plugins/nectar/nectar.php?action=edit&tab=details 

Line 87 

The above would be located in file nectar_webapi.php 

$save["cformat"] = (isset($_POST["cformat"]) ? "on" : ""); 
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did you copy the html_utility.php file to ./lib?
R.
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

Yes I have
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I don't get that error. Does it appear right after clicking "Add" or on "Save"? I just discovered an error that I introduced to your version; it's fixed by now.
I don't post yet, cause I want to catch your error first
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

And I don't have that problem with "0.28 beta1". But I'm running PIA from SVN now, so there may have been changes.
We're on the run packaging a 087g beta2 ...
Still investigating on that cformat error ...
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

When changing line 87 to

Code: Select all

$save["cformat"]       = (array_key_exists("cformat", $_POST) ? "on" : "");
do things change? I honestly don't suppose so.
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Next try: Change line 705 to read

Code: Select all

			if (document.getElementById('cformat') && document.getElementById('cformat').checked) {
This first checks whether that element is available (and yes, for me it always is available)
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest