See http://drupal.org/node/114774#comment-1087468 for the full story on the obscure API change to the 'update' op in hook_nodeapi(). This is causing a few problems:

A) PHP warnings about undefined variables

B) _signup_check_limit() doesn't have the right values and doesn't work right

C) time-based nodes don't automatically close if you edit them and they've already passed

Comments

dww’s picture

Status: Active » Needs review
StatusFileSize
new1.36 KB

To test this patch:

A) Create a signup-enabled node that has date info (either CCK datefield or event2) with a start time in the future.
B) Signup at least 1 user to the node.
C) Edit the node again and set the signup limit to 1 (see PHP warnings and watch signups remain open).
D) Edit the node to set the start time to something in the past (see PHP warning and watch signups remain open).

After you apply the patch, if you repeat everything, in step (C) you should see signups close without any PHP warnings. You should be able to edit it again to raise the limit and watch signups open again. When you try (D), it should again work without warnings and signups should remain closed, even if you raise the signup limit, etc.

stborchert’s picture

Status: Needs review » Reviewed & tested by the community

Did you already moved some code of this patch to HEAD?
C worked for me without applying the patch (no warnings, signup is closed => "Closed (limit reached)")

After applying the patch D) works, too: "event start time is already past the signup close-in-advance time, signups now closed."

 Stefan

dww’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

dww’s picture

Status: Fixed » Needs review
StatusFileSize
new926 bytes

Found a case where this was still broken. If you have an existing node that's not signup enabled and you try to signup-enable it, you get more bugs. This patch fixes it, although it won't apply cleanly until after #330828: Split module code into separate .inc files for D6 menu API lands.

dww’s picture

Status: Needs review » Fixed

Committed this to HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.