Webchick's great work on automatically creating bio nodes at registration has really made my day. But I found a small problem where the default settings weren't getting saved (and comment settings, which is how I found this). I've attached a patch to set these values properly.

Comments

jscheel’s picture

StatusFileSize
new687 bytes

Crud, wrong default value for the comment variable. Here is is again. Oh, sorry about the patch not being against cvs, I have everything frozen into svn right now.

webchick’s picture

Priority: Normal » Critical
Status: Needs review » Needs work

From IRC:

This is a thorny problem. While that patch will cover the node and comment default settings, it doesn't deal at all with other contributed modules adding things to the node type page (modr8, community tags, fivestar, etc.)

I have a feeling we're missing the call to some API function that takes care of this for us when we save the node.

jscheel’s picture

Status: Needs work » Needs review
StatusFileSize
new1.03 KB

Per our IRC discussion, the $node object is now initialized with node_object_prepare(). However, the default options for status, etc are not handled there, so I have kept that code in for the time being. I'm sure there is a better way for this, but I haven't found it yet. But, now any module that uses hook_nodeapi() to set node defaults should work properly with automatically generated bios. BTW, sorry about the patch, I've got to get a working copy from cvs... just haven't done it yet :)

webchick’s picture

Status: Needs review » Needs work

I tested this with the following settings:

- Unpublished by default (node.module setting)
- Comments disabled (comment.module setting)
- In moderation queue checked (modr8 setting)
- Community tagging on a tab (community tags setting)

Without the patch, I can confirm that not a single one of these settings is respected.

With the patch, only the node.module setting is respected. hrm.

webchick’s picture

Ok, I fixed this by moving the node_object_prepare($node); line down a bit, past the initial setup stuff. Seems to be working better now. Not sure if it meets all edge cases (for example, community tags still didn't seem to take), but is definitely better than it was.

Committed to 5.x-1.x-dev.

webchick’s picture

Status: Needs work » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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