Edit Data Templates - Duplicate form tag

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
otherguy
Posts: 8
Joined: Sat Apr 28, 2007 7:24 pm

Edit Data Templates - Duplicate form tag

Post by otherguy »

I've been struggling for a couple days to figure out why I am unable to save changes to Data Templates - now I think I see the problem. In data_templates.php, it looks like there is an extra opening <form> tag when editing a data template. The first one is under the Data Templates heading, and the second one is under the Data Source heading.

I think this is screwing up the form submission in IE9, and the hidden fields aren't being included because they're before the second <form> tag. This is causing the save_component_template field not to be posted back, which skips over the entire form_save function and returns a blank page.

I'm running Cacti v0.8.7g. I have PIA 2.9 and a small handful of plugins installed. I haven't tested to see if other browsers are affected, since I'm using Kerberos authentication and I can't get it to work with anything other than IE.

Has anyone else seen this?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Edit Data Templates - Duplicate form tag

Post by gandalf »

Raw html of the failing lines would help
R.
otherguy
Posts: 8
Joined: Sat Apr 28, 2007 7:24 pm

Re: Edit Data Templates - Duplicate form tag

Post by otherguy »

Already fixed it locally. Somewhere in the page one of the draw_edit_form() calls was missing the "no_form_tag" => "1" config parameter. May have been more than one page/place, I don't really remember exactly at this point. I'll see if I can track down exactly where it was.
otherguy
Posts: 8
Joined: Sat Apr 28, 2007 7:24 pm

Re: Edit Data Templates - Duplicate form tag

Post by otherguy »

Here's what I did to fix this:

data_templates.php line 461 was originally:

Code: Select all

			"config" => array(
Changed to:

Code: Select all

			"config" => array("no_form_tag" => "1"
graph_templates.php line 393 had the same problem. I applied the same fix as above and both pages work fine now.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Edit Data Templates - Duplicate form tag

Post by gandalf »

Both are correct fixes and since some time part of SVN. cigamit fixed them already. They will be published along with 087h
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests