I tried it both in IE and Firefox, on a fresh (no upgrade) multisite installation of Drupal 4.7 (with plenty of mods installed, though).

Regardless on the Filter selection, it always goes back to Incomplete and Complete Tasks are never listed.

Other users have found the same problem:
http://drupal.org/node/64141

Comments

sanduhrs’s picture

confirmed, on a updated 4.7.

wmswms’s picture

The 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?

wmswms’s picture

Status: Active » Needs review
StatusFileSize
new2 KB

Ok, 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.

marknewlyn’s picture

Thanks for the patch - its working well for me.

flooey’s picture

I 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.

Rasputin Paracelsus’s picture

Tried update #5 as suggested by flooey, didn't seem to work for me... still bounces to home page. Can anyone advise?

moonray’s picture

Assigned: Unassigned » moonray
StatusFileSize
new2.2 KB

This 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).

moonray’s picture

StatusFileSize
new2.22 KB

Oops, lost the task count there. Fixed in this patch.

moonray’s picture

Status: Needs review » Fixed

Applied in CVS for 4.7 and HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)