Cacti / plugin_reportit

ReportIt Plugin for Cacti
GNU General Public License v2.0
7 stars 9 forks source link

Unable to "save" reportit template anymore as result of fix to issue #40 #45

Closed ikorzha closed 6 years ago

ikorzha commented 6 years ago

I am sorry that have to bring another issue related to reportit. The functionality did use to work until recent changes. Issue is as following: Console->Reports->Select a previously locked report to edit->remove locked status and hit save..-> Results in below msg and no unlock:

(/plugins/reportit/templates.php: 65 form_save)(/plugins/reportit/templates.php: 603 input_validate_input_number)(/lib/html_validate.php: 33 die_html_input_error)(/lib/html_validate.php: 64 cacti_debug_backtrace)

From Cacti log: image

netniV commented 6 years ago

I'll see if you have a report in your db... then I'll try and unlock it.

ikorzha commented 6 years ago

Don't try, there are no templates in that DB. I just started looking into this plugin seriously yesterday. However if you can fix ;) the template import and export functionality that doesn't work I will be happy to share a report template with you from my current installation :)

ikorzha commented 6 years ago

Additional information: I believe this "template save problem" has been introduced when you resolved issue #40 I have just reverted changes to revision 86 as of 9/6/18 and I am able to create and save template/remove lock. Please examine changes that were introduced in by fix in #40 I have a strong belief it is a root cause of current issue.

netniV commented 6 years ago

Do you have any measurands on the report template?

ikorzha commented 6 years ago

Yes I do have measurands on template, however, issue is even simpler prior to adding measurands. Try creating a new reportit template, doesn't matter which data source you use and hit save, you will get error msg on attempt to save.

netniV commented 6 years ago

Is that with or without #41 ?

ikorzha commented 6 years ago

I just did an additional testing and have exact results, issue was introduced by fix in issue #40 instead of 41, (my apologies for confusion and guess work.) Without #40 everything is working correctly, issue is introduced when update file: /reportit/include/global_forms.php to the latest revision, revision history show that last time this file was updated to resolve issue #40 Now you have complete info.

ikorzha commented 6 years ago

FYI: Change that broke the Camal's back ;) image

netniV commented 6 years ago

Yeah, I had already identified that. I think the reason is that as a label, it doesn't get resubmitted when the form does so it loses the value. There are two choices, change the type whilst still keeping it readable, or include the value as a hidden field so it's transmitted. I'm tempted to go with the latter.

netniV commented 6 years ago

Should now be resolved.

ikorzha commented 6 years ago

Thank you I have validated the new fix, this portion of reportit is now fully functional.

I have generated my first report and I do see lots of issues, from visual to technical (unrelated to this one:) ). I will be continue opening issue 1 at a time so this plugin can get to quality standard of cacti itself Thank you once again for working with me on it. New issue #46 is open for the next issue on the list.