Newly created nodes are unpublished
robertDouglass - March 19, 2006 - 09:42
| Project: | Listhandler |
| Version: | HEAD |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | philipnet |
| Status: | needs work |
Jump to:
Description
This is a support request as much as a bug report since I've just used this module for the first time.
When I send a mail to the list from an email that corresponds to a Drupal user, it creates a new forum topic and puts it in the right forum. The only problem is that the status of that node is 0, so it doesn't appear anywhere. This patch explicitely sets status = 1 in the listhandler_mailhandler() function and the problem disappears. Is this the correct approach?
| Attachment | Size |
|---|---|
| listhandler_0.patch | 524 bytes |

#1
The published status of the node need not be hardcoded into the module. You can simply add a line that assigns the correct publish status in the respective mailhandler mailbox entry. For example, I have my mailboxes set up like this:
type: forum
tid: 41
status: 1
promote: 1
comment: 2
#2
listhandler will let mailhandler do the node_save call. That call wil use the defined defaults.
#3
I pasted the commands into my mailhandler mailbox and changed the tid to match the forum I want published. I must be missing something because it will handle the mail, but posts the new content unpublished. Is there a leading character identifing those entries as commands?
#4
yes the same is true for me: pasted the commands into my mailhandler mailbox and changed the tid to match the forum I want published. New topics are published but new comments remain unpublished. What are we missing?
#5
It appears that comments with status: 0 are published and status: 1 are unpublished, yet with forum topics the opposite is true.
#6
Does the "authenticated user" have permission to "post comments without approval" ?
Listhandler finds out if the role that the user belongs too has the right to "post comments without approval", and acts accordingly when creating the node/comment.
P.S. If you want to re-open a closed issue, please update the "Status" box as appropriate.
Regards.
P.
#7
the authenticated user has permission to post comments without approval --- checked that already.
#8
it turns out that if I leave out
status: 1
in the default commands section of mailhandler, then both forum topics and their replies get published. That solves my problem, but is this the expected behavior? If so, the documentation should be changed so that "status: 1" is either further explained or eliminated.
#9
Thank you for finding this - I see the same results as well (removing the "status = 1" command results in all submissions getting published).
#10