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.
Now that twitter have switched off their old API, this module can't work without twitter module.
So a lot of code that was there for the transition period should be removed, as it does nothing other than complicate things:
- merge twitter_get_items() into get_items()
- remove the check for twitter module in hook_requirements()
- add twitter module as a dependency
Comment | File | Size | Author |
---|---|---|---|
#4 | twitter_pull_cleanup_1.diff | 15.31 KB | kaosagnt |
Comments
Comment #1
joachim CreditAttribution: joachim commentedHandling this in sub-issues:
#2045547: added twitter as a module dependency done.
Comment #2
micheas CreditAttribution: micheas commentedI am not sure where to add the following issue:
The hash tag urls need modified to not use https://search.twitter.com/ but rather https://twitter.com/
I'm just not sure where to report this bug.
Comment #3
joachim CreditAttribution: joachim commentedCan you first search to see if that is already reported, and then create a new issue for it please?
Comment #4
kaosagnt CreditAttribution: kaosagnt commentedFirst attempt at cleaning up twitter_pull. Having timeouts and eventually WSOD when api.twitter.com is unavailable is the motivation.
1) Remove old fall back to API 1 when twitter module fails to connect.
2) Merge the twitter_get_items into get_items.
3) Handle not being able to pull tweets such that we return a obj instead of a string when no tweet data is available.
Lots more to do but this is round 1.
diff against last known public release from https://www.drupal.org/node/1925860
Last updated: October 19, 2013 - 13:06
Last packaged version: 7.x-2.0-alpha2+3-dev
Comment #5
joachim CreditAttribution: joachim commentedIt's great to see someone doing clean-up on the code!
However, this patch covers too many different things, so it can't be committed as it stands.
Can you split it up and file different issues please? It's fine if each issue's patch depends on the previous one to apply cleanly, just make sure each issue says something like 'Applies on top of ISSUE URL'.
One way to split this up would be:
- apply the patch
- check out a new branch
- stage and commit the changes for one issue
- stash changes remaining
- do a diff to the previous branch
- repeat for each issue
Also, patches should always be rolled from the tip of a branch, not from a release, so you'd start this process with a diff to 7.x-2.x.
A few points I noticed in the patch below, will give you pointers about some of the issues that need to be split off.
As much as I like cleaning up whitespace, that should be done in a separate issue.
This looks like a new feature, or maybe a bugfix -- but a separate issue anyway.
This looks like a bugfix.
We can just remove the module_exists() check here -- twitter module is now a dependency.
This should go in the whitespace cleanup issue.
Is this a bugfix, or a change in function definition?
It looks like we can remove all this too?
This looks like another bugfix.
Comment #6
kaosagnt CreditAttribution: kaosagnt commentedThe patch is against a release not tip, as I needed to resolve WSOD issue with our production sites using twitter_pull,
I'll endevour to regenerate all of these changes against 7.x-2.x tip shortly. I'll need to setup a test site for this work too.
2, 6 & 8 are related to the issue of not displaying the TWITTER_PULL_EMPTY_MESSAGE when there are no tweets to show.
8 introduces a dummy object as that is what is required by the underlying display logic not a string.
6 is a change in functionality as well to help facilitate the above.
3 is a bugfix.