Needs review
Project:
Signup
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Mar 2012 at 11:52 UTC
Updated:
27 May 2012 at 16:41 UTC
Jump to comment: Most recent file
At this moment there are two switches whether you are allowed to signup.
1) Is the signup functionality enabled for this node located on the node form.
2) Is the signup list still open or closed on the signups tab.
At this moment only the second switch is stored in the database. Therefor it is not possible to actually 'disable' the functionality if a node type has the signup functionality default enabled. I think the solution is to save a bit with 'enabled' and store it in the database per node. Is this correct?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 0001-Issue-1506296-by-mradcliffe.-If-a-node-exists-and-do.patch | 941 bytes | mradcliffe |
Comments
Comment #1
sgabe commentedThe values are stored. To be exact the signup record is removed from the database when you disable the signup option, hence the default settings of the signup options will be set. I would agree, this is strange, but not a critical bug.
Comment #2
mradcliffeThe issue is that in signup_node_load() an existing node without any signups will not get the signup property on the node object. And that means in signup_alter_node_form() it will get the default signup state of the node type.
Rather than mess around with some performance issues in hook_node_load() we can add an additional else if in signup_alter_node_form() to check if the node already exists.
Patch attached. Instructions: