Nector Save error

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

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

Post by gandalf »

Again, which exact browser version?
Are you able to test using a different browser?
R.
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

firefox (with firebug), explorer and opera......
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did I already ask you to post the web pages source code (Ctrl-U in FF)?

If there is no such "id" named "row_font_size", all would be clear. But I always have that, so the "is null" case should not occur.
Ok, I could add an "is null" check just as the display value would not be set. But I still wonder why this happens and why I can't reproduce
R.
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

it is working now....there was an error on one the database tables(no idea, what happened to it)

backed up the data, recreated the database.

Works fine now....

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

Post by gandalf »

Thanks for reporting. Was pulling my hair out on that issue
R.
13hakta
Posts: 6
Joined: Thu Dec 02, 2010 12:35 am
Location: Sterlitamak
Contact:

Re: Nector Save error

Post by 13hakta »

I've found how to fix this error when adding new items to report.

Replace line 721 in nectar_webapi.php to:

Code: Select all

		html_start_box("<strong>Report Items</strong> $header_label", "100%", $colors["header"], "3", "center", ($_SESSION["sess_nectar_level"] != NECTAR_PERM_ADMIN ? "nectar_user.php":"nectar.php") . "?action=item_edit&id=" . htmlspecialchars($_GET["id"]));
the problem was that "&" symbol was replaced to & and so "id" argument was omitted.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Nector Save error

Post by gandalf »

13hakta wrote:I've found how to fix this error when adding new items to report.

Replace line 721 in nectar_webapi.php to:

Code: Select all

		html_start_box("<strong>Report Items</strong> $header_label", "100%", $colors["header"], "3", "center", ($_SESSION["sess_nectar_level"] != NECTAR_PERM_ADMIN ? "nectar_user.php":"nectar.php") . "?action=item_edit&id=" . htmlspecialchars($_GET["id"]));
the problem was that "&" symbol was replaced to & and so "id" argument was omitted.
Thank you for posting; but which version of nectar is this based upon?
R.
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: Nector Save error

Post by Deele »

The error is caused by wrong parsing of ampersent char.
When you create a new report, switch to "Items" tab and point onto "Add" button, you will see link:
And that is causing all trouble. When you click this link, next page - Item creation, will not know to which report to add that item and it will show:

Code: Select all

Report Item [new Report Item: ]
In title, where after "Item: " there should be report name, but as script does not know that, there is empty title.
This bug is caused by line 721 in nectar_webapi.php:

Code: Select all

html_start_box("<strong>Report Items</strong> $header_label", "100%", $colors["header"], "3", "center", htmlspecialchars(($_SESSION["sess_nectar_level"] != NECTAR_PERM_ADMIN ? "nectar_user.php":"nectar.php") . "?action=item_edit&id=" . $_GET["id"]));
The function htmlspecialchars is converting & to &.
The line should be modified, one of solutions is this:

Code: Select all

html_start_box("<strong>Report Items</strong> $header_label", "100%", $colors["header"], "3", "center", htmlspecialchars(($_SESSION["sess_nectar_level"] != NECTAR_PERM_ADMIN ? "nectar_user.php":"nectar.php")) . "?action=item_edit&id=" . htmlspecialchars($_GET["id"]));
PS: Sorry, did not read last two posts, where you have already solved this :roll: I just hope, someone will read this and try not to make such a mistake in future :P
pierinux
Posts: 1
Joined: Fri Dec 10, 2010 12:26 pm

Re: Nector Save error

Post by pierinux »

with cacti 0.8.7g and nectar 0.21 I had the same problem.
now it's fixed changing line 702 of nectar_webapi.php with the following:

Code: Select all

html_start_box("<strong>Report Items</strong>", "100%", $colors["header"], "3", "center", htmlspecialchars("nectar.php?action=item_edit")."&id=" . $nectar_id);
great debugging, dudes, thanks! :D
kbartoletta
Cacti User
Posts: 146
Joined: Tue Oct 04, 2005 4:20 pm
Location: suwanee, ga
Contact:

Re: Nector Save error

Post by kbartoletta »

Looking for some assistance on this old post.... i used the beta version show above to correct this same problem... in doing so, i simply moved the existing nectar directory to a different location and expanded the beta verison in it's place. Problem is, i seem to have lost my existing nectar reports that were already set up... i assume that the data for these reports is stored in the database and not in the ./nectar folder that i moved to a different location right? The new beta version corrected the error i as getting but do i have to recreate all the reports that i had?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest