Closed (fixed)
Project:
Subscriptions
Version:
5.x-2.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2010 at 13:05 UTC
Updated:
30 Mar 2010 at 20:20 UTC
Hi,
i am using Drupal 5 latest subscription module.
- I use the subscriptions_content and subscriptions_taxonomy.
- User subscribers to a certain taxonomy tag - for NEW and COMMENT only (and not for UPDATE)
- a node is submitted using this tag, but is not set to "published"
- afterwards, node is actually published.
Result - no subscriptions email is sent.
I saw that the Notification module does treat setting the "published" of a node as if the node was created, which sounds like a more standard behavior.
Only way to work around this is to subscribe to updates on the node - but most users don't want that.
Can you please help,
thanks,
Noam,
Comments
Comment #1
salvisHow do you set the node to published?
Have you tried doing it via node/NID/edit or admin/content/node/overview? Both of these should work.
Comment #2
noamdanon commentedtrying it using node/nid/edit.
again, exact flow is this:
- user subscribers to tag1, but only to new - no updates
- i submit a new node with tag1, and set published=FALSE
- entry is added to subscription_queue
- i run cron - no email is sent (node is not published yet)
- i change the node to published=true
- nothing is written into subscription_queue...
If i do the same but publish directly, everything works nicely.
Comment #3
noamdanon commentedi just made the following fix to subscriptions_content_nodeapi line 212:
instead of the original:
'action' => $op,i put:
'action' => ($op == 'update' && $unpublished_nid == $node->nid && $node->status ? 'insert' : $op),same as done for the is_new field of the event.
now it does work very nicely.
i did not go into the full details of the rest of the code, but it seems that if the action is set to 'update', the code adds an extra WHERE filter to the subscriptions table, looking only at those that have "send_updates=1".
setting the action in this case to 'insert', overrides this.
Can someone verify that the change i made does not mess anything up?
Comment #4
salvisHmm, seems like 5.x is lagging behind 6.x in this respect. 6.x got the following fix:
http://drupalcode.org/viewvc/drupal/contributions/modules/subscriptions/...
Maybe this should go into 5.x as well...
I'm not sure this will work, but it would be my first try...
If detail publishing is not in 5.x, then bulk publishing most likely isn't in there either...
Comment #5
noamdanon commentedok, excellent - I really appreciate this help!
this is basically very similar to my change, which means I was on the right direction.
any other things that you think i should take from the version 6?
Comment #6
salvisLet us know if it actually works, and I'll commit it to the D5 version.
Look through the CVS history to see whether you find other updates that might be beneficial. I stopped dragging along the D5 version about half a year ago because no one showed any interest in providing any feedback whatsoever.
Comment #7
noamdanon commentedSeems to work fine, yes.
thank you,
Comment #8
salvisOk, thanks for letting us know.
I've committed the D6 fix from #560146: Digest Subscriptions don't send if not set to "published" before cron runs to 5.x-2.x-dev as well. Give it up to 12h to be repackaged.