Nector Save error
Moderators: Developers, Moderators
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
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.
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.
Re: Nector Save error
I've found how to fix this error when adding new items to report.
Replace line 721 in nectar_webapi.php to:
the problem was that "&" symbol was replaced to & and so "id" argument was omitted.
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"]));
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Nector Save error
Thank you for posting; but which version of nectar is this based upon?13hakta wrote:I've found how to fix this error when adding new items to report.
Replace line 721 in nectar_webapi.php to:the problem was that "&" symbol was replaced to & and so "id" argument was omitted.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"]));
R.
Re: Nector Save error
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:
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:
The function htmlspecialchars is converting & to &.
The line should be modified, one of solutions is this:
PS: Sorry, did not read last two posts, where you have already solved this I just hope, someone will read this and try not to make such a mistake in future
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:http://yourhostname/cacti/plugins/necta ... _edit[b][u]&[/u][/b]id=1
Code: Select all
Report Item [new Report Item: ]
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 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"]));
Re: Nector Save error
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:
great debugging, dudes, thanks!
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);
-
- Cacti User
- Posts: 146
- Joined: Tue Oct 04, 2005 4:20 pm
- Location: suwanee, ga
- Contact:
Re: Nector Save error
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?
Who is online
Users browsing this forum: No registered users and 0 guests