Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Right now, retweets show the retweeted user, making it appear as though I had selected that user to show their tweets. There should be an option for what the behavior should be. Attaching a dead simple patch that also fixes the issue at http://drupal.org/node/1933110 since it's the same line of code. Just adds a variable, "twitter_pull_retweet_user", that is checked before assigning the retweet user as the one to use. Defaults to TRUE so that things don't change on people. No admin interface for setting this variable.
Comment | File | Size | Author |
---|---|---|---|
#10 | twitter_pull-retweet-user-1935318-5.patch | 816 bytes | cdenneen |
#9 | twitter_pull-retweet-user-1935318-4.patch | 798 bytes | cdenneen |
#7 | twitter_pull-retweet-user-1935318-7.patch | 892 bytes | elliotttf |
#3 | twitter_pull-retweet-user-1935318-3.patch | 830 bytes | wbobeirne |
#2 | twitter_pull-retweet-user-1935318-2.patch | 686 bytes | wbobeirne |
Comments
Comment #1
wbobeirne CreditAttribution: wbobeirne commentedComment #2
wbobeirne CreditAttribution: wbobeirne commentedApologies, left a comment of the original implementation in there. Attaching a new patch without that comment.
Comment #3
wbobeirne CreditAttribution: wbobeirne commentedSo it turns out twitter_pull sends in the item as an array with nested arrays, and the twitter module sends it in as an object with nested objects. Simply casting wasn't working because that's not recursive, so I'm attaching a patch that does a json encode/decode to get the whole thing to be an object.
Comment #4
victoriachan CreditAttribution: victoriachan commentedI've tested this. It works well and fixes the bug caused by $item array/object inconsistency as well (#1933110).
Hope it gets committed.
Thanks!
Comment #5
tinkerbelle CreditAttribution: tinkerbelle commentedAnother vote for this patch working, fixing #1933110: Incorrect parsing of items. (notices ar thrown), and being something I'd love to see committed!
Thanks wbobeirne!
Comment #6
mfernea CreditAttribution: mfernea commentedI agree that the patch at #3 solves #1933110: Incorrect parsing of items. (notices ar thrown) too.
Comment #7
elliotttf CreditAttribution: elliotttf commentedI had to convert the user to an object for my use case too, but otherwise this worked perfectly.
Comment #8
wbobeirne CreditAttribution: wbobeirne commented#7, json_encode / json_decode recursively converts an array to an object. No need to do it twice.
Comment #9
cdenneen CreditAttribution: cdenneen commented@wbobeirne
I've created patch #4 which is the same as your patch #3 but applies cleanly with http://drupal.org/files/typecast_user_variable_in_twitter_class-1781024-...
that contains a patch to fix the lists author issue with 7.x-2.x-dev (http://drupal.org/node/1781024#comment-7232862)
Comment #10
cdenneen CreditAttribution: cdenneen commented@wbobeirne
For some reason the git diff got truncated here is the #5 patch which should fix the issue with #4
Comment #11
jec006 CreditAttribution: jec006 commentedThanks guys, committed here: http://drupalcode.org/project/twitter_pull.git/commit/86d7532
Thanks to all of you
Comment #13
joachim CreditAttribution: joachim commented> No admin interface for setting this variable.
And no documentation either! How is anyone meant to know this exists?
Comment #13.0
joachim CreditAttribution: joachim commentedAdded link to issue