Nector Save error

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

gandalf wrote: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.
Yes it does, but still I can't Add a report and the problem happens right after I do ADD, at least Firebug catches right after
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

The second change fixed the error but right after the else I'm getting this error now

document.getElementById("row_font_size") is null

Line 93

Code: Select all

}else{
				document.getElementById('row_font_size').style.display='';
nectar_webapi.php line 710
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

We're getting close, but I still can't get a single error like this. Which exact FF version are you using?
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Assuming, that script execution and page load may cause the problem, please replace the "offending" <script> by

Code: Select all

		<script type="text/javascript">

		function addLoadEvent(func) {
			  if(typeof window.onload != 'function')
			    window.onload = func;
			  else {
			    var oldLoad = window.onload;

			    window.onload = function() {
			      if(oldLoad) oldLoad();
			      func();
			    }
			  }
			}
					
		function changeFormat() {
			if (document.getElementById('cformat').checked) {
				document.getElementById('row_font_size').style.display='none';
				document.getElementById('row_format_file').style.display='';
			}else{
				document.getElementById('row_font_size').style.display='';
				document.getElementById('row_format_file').style.display='none';
			}
		}

		addLoadEvent(changeFormat);
		</script>
and retry
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

I replaceed the script.

and it went to the original messsage error

document.getElementById("cformat") is null

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

Post by gandalf »

That drives me crazy.
I still can't see those errors. I assumed, it would be an issue with executing the JS code prior to complete rendering of the DOM. So I'm flying blind.
Let's have a next try:
Please re-execute until that error shows up. Press Ctrl-U to get the html source code. Gzip and post that, please.
In my case, all questioned DOM variable exist and no error show up. In your case, I expect that some DOM vairiables are not (yet) defined, hence the "null" exception.
R.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Maybe on the plane tomorrow i can take a look at it.

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
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Well, I could do with some inspiration :cry:
R.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Tomorrow for sure though. Today, it's Margarita's and dinner with family. On number two right now.... Heading out in a bit.

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?
venter
Posts: 10
Joined: Tue Jun 15, 2010 5:54 am

Post by venter »

I have the same issue with cacti 0.8.7f and 0.8.7g beta2.
I get
Error: Save Failed: Field Input Error (Check Red Fields).
every time when I try to add item to report. Also with last versions of nectar (0.26 and 0.28b) I cannot delete report record after creation. It rises error
You must select at least one Report.
even in case of selected checkbox. Selectall checkbox doesn't work at all.

I tried all versions of nectar but items can be added only in 0.11.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is the new version.
I'm still working on making it compliant with Lotus Notes. Apart from that, I currently am not aware of any issue right now
R.
Attachments
nectar-v0.28b2.tgz
(54.39 KiB) Downloaded 308 times
venter
Posts: 10
Joined: Tue Jun 15, 2010 5:54 am

Post by venter »

gandalf wrote:This is the new version.
I'm still working on making it compliant with Lotus Notes. Apart from that, I currently am not aware of any issue right now
R.
All working now! :D Thanks!
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

I've just re-installed this new version of Nectar, and I have to say now, that is working like a charm with my cacti .87gbeta version.

Thank you man

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

Post by gandalf »

For all user of (or should I say: slaves of :wink: ) Lotus Notes, please see attached format file that at least works with our Lotus Notes 8.5.1 install on Linux Clients (yep, we go the hard way)
R.
Attachments
lotus_notes.format.gz
Drop this into ./plugins/nectar/include and gunzip it
(510 Bytes) Downloaded 133 times
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

Sorry I bring this back again, but My main cacti server is dying on me and I'm preparing a new system...Even though I'm able to get it going on my test system.... For some reason I keep getting this error on the new one....I followed all the steps we did before in this thread, but nothing

Code: Select all

document.getElementById("row_font_size") is null
http://missnetmon/cacti/plugins/nectar/nectar.php?action=edit&tab=details

nectar_webapi at line 721....

 }else{
                document.getElementById('row_font_size').style.display='';


no matter what I do this error won't go away....

Sorry and Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests