Closed (fixed)
Project:
Tasks Configuration Kit
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
18 May 2006 at 00:49 UTC
Updated:
30 Mar 2007 at 19:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
sanduhrsconfirmed, on a updated 4.7.
Comment #2
wmswms commentedThe problem appears to be that $_POST is empty at the point where the check is made for 1,0,-1. Im trying to find a fix. Its around line 322. Can anyone confirm?
Comment #3
wmswms commentedOk, so I had 3 issues and have a single patch for all:
1. The filter form submission works fine, but the 2nd page load that occurs after the intial submission loses $_POST data. So I use the $_SESSION object to remember it. I suppose this requires people to be logged in, but thats okay for my needs and I couldnt think of a better way.
2. The action for the filter form was relative, so it was compounding to /node/node/... I removed the setting for form action so it defaults to "self".
3. The pulldown default was hard coded for 0 (incomplete). Also $_SESSION wasnt working for this purpose, so there's now a third variable ($defaultfilter) that makes it work.
It seems to work fine for me, though perhaps there is a cleaner way to code this.
Comment #4
marknewlyn commentedThanks for the patch - its working well for me.
Comment #5
flooey commentedI was able to fix this simply by adding the line
$form['#redirect'] = FALSE;at the end of the form definition, before drupal_get_form is called. This prevents drupal_get_form from performing a page reload as a result of the form submission.
Comment #6
Rasputin Paracelsus commentedTried update #5 as suggested by flooey, didn't seem to work for me... still bounces to home page. Can anyone advise?
Comment #7
moonray commentedThis patch will solve all the worlds problems!
OK, maybe not quite, but it gets your filtering to work properly AND makes sure your filter stays available, even when there are no visible sub-tasks (like when you filter for completed tasks, but have none completed yet).
Comment #8
moonray commentedOops, lost the task count there. Fixed in this patch.
Comment #9
moonray commentedApplied in CVS for 4.7 and HEAD.
Comment #10
(not verified) commented