Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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: