In some circumstances, the content type edit form (ie. /admin/content/node-type/TYPE) does not display existing Comment Closer settings - making it impossible to tell how the content type is currently set up. This is because the the form's #default_value keys sometimes aren't being set correctly.
I narrowed this down to comment_closer_form_alter, where the code pulls out the content type ($type) from the $form['identity']['type'] array. The code currently looks for $form['identity']['type']['#value']. This is correct when the content type is locked, but not when it is unlocked. In this case we need to pull $type from $form['identity']['type']['#default_value'].
I have written a patch that checks for the both #value and #default_value keys in setting $type, removing this problem.
Thanks, David.
| Comment | File | Size | Author |
|---|---|---|---|
| comment_closer-type-settings-fix.patch | 588 bytes | dbassendine |
Comments
Comment #1
rjmackay commentedAny comment on this?
We're running this on a production site and its doing fine.
RTBC??
Comment #2
rmiddle commentedCommit to 6.x branch. Not needed in 7.x branch.
Thanks
Robert