Closed (duplicate)
Project:
Twitter
Version:
7.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
24 Feb 2009 at 22:41 UTC
Updated:
22 Aug 2015 at 09:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alastair commentedActually, that patch doesn't fix the issue. :-S I'll try and put together another.
Comment #2
jbrauer commentedUpdating status to reflect comment #1
Comment #3
eyecon-1 commentedSubscribe
Comment #4
Leeteq commentedSubscribing.
Comment #5
mandclu commentedSubscribing
Comment #6
podarokusing scheduler module twitter do not twit!
subscribing
Comment #7
ArthurC commented@alastair: in comment #1 you said your patch doesn't work and that you'd try to put together another. Were you successful?
I didn't twig to the importance of tweeting only published nodes until I saw the first unpublished one tweeted. Yikes!
Comment #8
alastair commented@ArthurC I'm afraid not; it got shuffled down my to-do list somewhat. I'll see if I can get something done in the next couple of days.
Comment #9
ArthurC commented@alastair: That would be wonderful. I'll check back regularly. Thanks.
Comment #10
ArthurC commentedAs I spend more time with the Twitter module, I think I understand better how it works. Others reading this may already understand, but perhaps this will be helpful for a few.
I've been using the action/trigger automatic tweets for new nodes. Something I noticed is that the url in the tweet is "...node/nn" instead of the url that the pathauto module generates. Wondering why that might be, I'm thinking that the pathauto code probably hasn't even had a chance to do its magic before the twitter module kicks into action. Maybe the node itself isn't completely resolved. Maybe it's not even possible to check $node->status at this stage?
So I turned off the action/trigger method, and am using the manual method, whereby you check whether to tweet or not when editing the node. Lo and behold! It knows published from unpublished and won't tweet for unpublished nodes no matter how hard you click the "Announce this post on Twitter" check box. (This may be where twitter_nodeapi() in twitter.module gets to play.)
I'd like the automatic action/trigger to work, but the manual method does afford a greater degree of user control over when to post the node to Twitter.
@alastair: please don't make any urgent efforts on my behalf, but if you do get it working, I'll be watching for it.
Thanks.
Comment #11
alastair commented@ArthurC: I think you're right. I spent a fairly frustrating time (compounded by some recent computer problems) getting nowhere with this. To get this to work correctly, I think Drupal core would need the capability to configure the order in which triggers fire, and perhaps precisely when (i.e., before post save, after post save, etc.) too.
However, I've found that the manual method also posts unpublished nodes in my deployment. I'll double-check what version I'm using of the module when my computer's back up and post a separate bug report if needs be.
This bug report could probably be legitimately closed as "won't fix" or "by design".
Comment #12
juampynr commentedAs you command in the latest comment.
Comment #13
Leeteq commentedHas this been a known problem also in the D7 branch?
Comment #14
juampynr commentedDanielTheViking: I have not checked, but the D7 branch is in a pretty similar state as the D6 branch (6.x-3.x), so believe so.
To be honest I do not understand what is really happening. Could anyone provide steps to reproduce the issue? that would help me understand and evaluate if a fix is needed now or not.
Comment #15
Leeteq commentedWould be nice if someone that is experiencing this with the 7.x branch would chime in and confirm here.
Comment #16
tuwebo commentedHi,
I have just tested the manual posting method in D7. What I did:
1 - Create an Article and check the "Announce this post on Twitter"
2 - Before saving, I unchecked both, Published and Promoted to front page, so the node will be saved but not published.
3 - Run cron, and go to twitter account. Nothing was posted to twitter-> OK
Then I did next steps (manual method):
1 - Create an Article and check the "Announce this post on Twitter"
2 - Before saving, I checked "Published", so the node will be saved and published.
3 - Run cron and went to my twitter account: It was posted to twitter-> OK
So it looks like the manual method works fine in D7 latest branch.
Comment #17
tuwebo commentedHi,
To see the behavior in D7 for automatic posts, we need to have a stable twitter_actions.module, wich we can follow in this #1317196: Implement Actions and Rules integration for Drupal 7
Comment #18
tuwebo commentedUsing this patch #1317196-2: Implement Actions and Rules integration for Drupal 7, I can set an action (Post message to twitter).
When I am saving a node (even if it is unpublished) the message will be sent, but I think this is the right behaviour, since there is no condition attached to the action.
Comment #19
steinmb commentedRegarding the tests in #16, did you also test with the default setting set to "post to twitter" ?
Comment #20
tuwebo commentedHi steinmb,
Yes I did, it will always be posted in that case, no matter if the node is published or unpublished.
There is an issue which is implementing some rules #1317196: Implement Actions and Rules integration for Drupal 7, maybe (I don´t know if it is possible) it would be helpful to add a condition to the rules, something like "Node is published", and then use that rule for "posting to twitter" instead.
What do you think about it?
Comment #21
steinmb commentedOK, I was afraid that would happen, changing status. I know a lot of sites are not using rules, and I think rules is a bit heavy just for this, I find this to be unexpected behavior and we have to fix it within the module. Don't get me wrong, the idea of having a "node is published" condition that rules is great, and we need that to.
Comment #22
tuwebo commentedHi,
I have added a patch.
Now the user have the option to choose to send the message even if the content (node) was unpublished.
I think this is a feature request, since the module was working as spected.
If nobody minds, I will change the status to Featured request and needs review.
Please test it, since I didn´t have much time for it.
You can go to admin/config/system/actions, and select configure from "Post a message to Twitter".
There should be a new checkbox asking for posting messages even if the content is not published.
Comments and reviews are very welcome.
Notice that this will only works for actions on comment and node triggers.
We also need to ask the mantainer if this is the right behaviour for this module...
Comment #23
widhalmt commentedsubsribe
Comment #24
tuwebo commentedDoes anyone tested the patch?
widhalmt if you did it, please report.
Comment #25
davidneedhamCan you re-roll to 7.x-5.x?
Comment #26
13rac1 commentedPatch applies with fuzz/offset to 7.x-5.x, but needs reroll. Needs further testing.
Misspelling:
+ if($post_unpublised_content)Comment #27
damienmckennaTriggering the testbot.
Comment #28
damienmckennaTriggering the testbot.
Comment #29
damienmckennaComment #30
steinmb commentedPatch no longer apply to HEAD. I'll try to manually fix it.
Comment #31
damienmckennaClosed two duplicates: #499712: Nodes are being posted to twitter even if they are not published., #2474187: Reconsider "post tweets field" paradigm
Comment #33
damienmckennaComment #34
damienmckennaThis was fixed in #2430229: Tweeting on node update should be configurable.