Project

General

Profile

Bug #285

Dashboard widget settings not being saved

Added by Abdsalem Chaoui over 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
Dashboard
Target version:
Start date:
01/05/2010
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.0
Affected Architecture:

Description

2.0-BETA1 built on Tue Jan 5 10:29:05 EST 2010

1) Firewall logs widget - changing "Number of lines to display" to a selection on the list box throws out an error
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/niftycssCode.css:16) in /usr/local/www/widgets/widgets/log.widget.php on line 44

However the setting is saved.

2) Traffic Graph widget - changing "Refresh Interval" to a selection on the list box does not save the desired update interval.

Appologies if I was meant to list these as 2 seperate bugs.

Thanks

Slam

Associated revisions

Revision f07cb7ce (diff)
Added by Chris Buechler over 9 years ago

fix Firewall Logs widget settings save.

Ticket #285

Revision acc5dd59 (diff)
Added by jim-p about 9 years ago

Fix widget settings in general. Initialize widget list before use. Fixes #285.

History

#1 Updated by Fred Taylor-Young over 9 years ago

Regarding #1:

I've played around with the PHP code for the widget and watched what it does in Firebug, and have noticed that despite its action attribute set to make the form submit to itself, the form is actually submitted to index.php.

<form action="/widgets/widgets/log.widget.php" method="post" name="iforma">

The widget still tries to run its header() code though, which is causing the error message you see:

Header("Location: /");

All this behavior is caused by this line, which appears just after the <body> tag, and only ends just before the closing </body> tag:

<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<form action="index.php" method="post">
[...]
</form>
</body>


By coincidence, while playing around with the picture widget yesterday I noticed that it has a closing </form> tag before its own opening <form>, presumably to fix this problem.

I've seen three ways of fixing this issue (although it's entirely possible that there may be other things that I've overlooked):
  1. End the first <form> tag much earlier in the page - I don't know if it needs to encompass most of the page or not, so this may not be an option
  2. Like the picture widget, add a </form> tag
  3. Remove the header() line - however, this will likely break the widget if the overall <form> tag is later fixed/ended before the widgets

#2 Updated by Fred Taylor-Young over 9 years ago

I missed a word; it was meant to say: "All this behavior is caused by this <form> line [...]"

#3 Updated by Chris Buechler over 9 years ago

#1 is fixed.

#4 Updated by Ermal Lu├ži over 9 years ago

  • Status changed from New to Feedback

In the forums after removing all the inline javascript inclusion reports say this is fixed.

#5 Updated by Abdsalem Chaoui over 9 years ago

I tested a build from yesterday and I can confirm that the Traffic Graph widget's refresh interval is working as advertised. Thanks

#6 Updated by Jeppe Oland about 9 years ago

With pfSense-2.0-BETA1-20100407-1435, the Traffic Graph widget's refresh interval is NOT working.

#7 Updated by Chris Buechler about 9 years ago

  • Status changed from Feedback to New

traffic graph widget refresh interval still not working

#8 Updated by Anonymous about 9 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF