I was wondering why this module wasn't working at all. I was only getting entries in the log like:

Recieved [sic] an unexpected reply from Twitter. Perhaps just a fail whale? Our search url with query:
@http://search.twitter.com/search.json?rpp=12&q=%23pid

The location of the twitter search has changed to twitter/search according to http://media.twitter.com/newsrooms/report#search and I guess this is the reason.

Btw: Shouldn't at least something be rendered even if the twitter block cannot pull anything? I am getting nothing at the moment, not even an empty block.

CommentFileSizeAuthor
#31 rename_twitter_search.patch1.74 KBcweagans

Comments

di3gopa’s picture

I have exactly the same problem, the block it is not showing at all

di3gopa’s picture

according to http://search.twitter.com/api/ it is still search.twitter.com/search.json..

dddave’s picture

Mmh...

I am totally incompetent with php so I cannot check the code this module is using. But something is horribly broke here. I am wondering why there aren't more support requests. My setup is pretty vanilla D7.4 and Bartik.

adshill’s picture

Same problem here. Everything worked fine for weeks and now suddenly the block doesn't appear at all. We didn't change anything on the site in that time. Something is amiss me things! Likewise I'm not a php man so can't check this. Any help greatly received as the module simply doesn't work right now! Can happily test if given pointers.

Thanks,

Adam

adshill’s picture

Title: New search location for twitter » Twitter block is not showing at all

I've altered the title so that it is more clear if others are having the same problem.

jpsolero’s picture

Just change

$this->url_query = 'http://search.twitter.com/search.json?' . http_build_query($this->options);

with

$this->url_query = 'http://search.twitter.com/search.json?' . drupal_http_build_query($this->options);

En el fichero twitter.class L126

adshill’s picture

That doesn't fix it for me, does it work for others?

barbi’s picture

I am able to get this module working using drupal 7.4 and twitter blocks 7.x-beta1 on my local dev.

Can you please provide more details - Drupal version, Twitter blocks version, Twitter block configuration. Please check if you have "cache blocks" turned on. You can control this setting under admin/config/development/performance

Also can you please try clearing the caches?
admin/config/development/performance -> Clear all caches

If you have a live URL running this module, please provide the URL. This makes it easier to debug.

adshill’s picture

Sorry, the above fix in #6 worked form me, it just took a bit of time to kick in when the next item was posted on the Twitter account we're feeding.

mortendk’s picture

subscribe

dddave’s picture

The fix in #6 is working for me too.

ZenDoodles’s picture

Assigned: Unassigned » ZenDoodles
Status: Active » Reviewed & tested by the community

This appears to be a good fix. Nice catch @jpsolero. It will be in the next release.

Thanks so much for your contribution!

hadi farnoud’s picture

I get error 500

Marc Bijl’s picture

Hi, just wanted to let you guys know that #8 made this module working for me:

1. Please check if you have "cache blocks" turned on.
You can control this setting under admin/config/development/performance

2. Also can you please try clearing the caches?
admin/config/development/performance -> Clear all caches

Great, many thanks!!!

Marc Bijl’s picture

Just found out tweets need to be quite recent (younger than a week or so). In my case, tweets from last Friday (that is 7 days ago) are not shown.

Katy J’s picture

Thanks for all the suggestions. I think my problem was #15 - so I just added some new tweets and then I actually reverted to the original line of code (i.e. undid the instructions in #6) and then cleared the cache. Seems to be fine now.

carlomontagnino’s picture

I'm still not able to get this block to work.

When I first installed the module,and configured the block, it worked fine. 2 hours later it completely disappeared. I tried all of the solutions in theis thread to no avail. Does ANYONE have a clue on getting this working?

larsdjohnson’s picture

#15 worked for me as well.

This block only shows tweets in the last week or so.

I think this is a pretty important bug to fix.

brandy.brown’s picture

None of these fixes are working for me either. Applied the patch in#6, cleared the cache, ran update, posted new tweets. Nothing.

dhigby’s picture

None of the fixes work for me either using beta1. Running latest Drupal 7. Yes I have caching on, but I have cleared it. I changed the line of code in #6 to add the word "drupal".

error reports:

Recieved an unexpected reply from Twitter. Perhaps just a fail whale? Our search url with query:@http://search.twitter.com/search.json?rpp=10&lang=English&q=from%3A%40Do...

trickyricky26’s picture

Check the language settings in the block configuration page. For some reason language was set to "eng" when it should be "en".

I left the language settings blank and it worked perfectly.

Robin Millette’s picture

I traced a problem to a conflict with the twitter module. Both register a TwitterSearch php class. It's new in the twitter module and the class isn't used for anything yet.

Either modules will have to change their class name unfortunately. Or maybe I'm missing something... I'm not familiar with the class registry at all.

See also #1421936: Class registry conflict with Twitter Block module (Twitter module issue).

Robin Millette’s picture

On IRC, davereid said

millette: well twitter_block is at fault here. It's not using a class with the module namespace
TwitterBlockSearch

So this TwitterSearch class should be renamed to TwitterBlockSearch to go with the module name.

dddave’s picture

Status: Reviewed & tested by the community » Needs work

Setting new status due to the information in the two previous comments. Given the lack of activity in this queue I doubt that something will happen but let us be correct here. At least the module is working with the (apparently half-assed) fix in #6.

Robin Millette’s picture

If you also use the Twitter module and Twitter Block is giving you trouble, try the following.

Disabled and uninstalled Twitter_Block. Since the Twitter module TwitterSearch class is empty, I commented it out in twitter.lib.inc. Then I removed its entry (TwitterSearch) from the registry db table. Renamed twitter.class.php to twitter.class.inc and added that to the info file (it might have already be correct). Removed a line from twitter_block.module:

function twitter_block_block_view($delta) {
  // line 212 isn't needed
  // module_load_include( 'php', 'twitter_block', 'twitter.class' );

Reenabled Twitter_Block.

jphelan’s picture

#15 was the problem for me as well. Does anyone know if this is a limitation of the module or Twitter? 30 days would be nicer than 7.

willwh’s picture

Also seeing the behaviour from #15 - last tweet from the account I am displaying was 8 days ago - and today - the block is no longer visible.

Seems that this is just a limitation of the Search API, I think you'd need to specify a date for older tweets: http://stackoverflow.com/questions/6850855/twitter-search-api-suddenly-s...

jphelan’s picture

I've found that it is a limitation of the twitter search api. If you want tweets past 7 days you'll have to use the twitter module which doesn't use the Search API and is thus not limited to 7 days.

cweagans’s picture

Title: Twitter block is not showing at all » Rename TwitterSearch class to TwitterBlockSearch (conflict with twitter.module)
Issue tags: +Novice

I committed a change last night that should allow you to get > 1 week of tweets. For this issue, we just need to rename the TwitterSearch class to TwitterBlockSearch as davereid suggested. This will fix the conflict with Twitter.module. Retitling this issue to reflect what needs done. Setting status to active because there's no patch here yet. Finally, tagging Novice because this is a very easy task.

cweagans’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Assigned: ZenDoodles » Unassigned

This too.

cweagans’s picture

Status: Needs work » Needs review
StatusFileSize
new1.74 KB

Patch attached.

cweagans’s picture

Status: Needs review » Fixed

Committed and pushed.

cweagans’s picture

Status: Fixed » Closed (fixed)

Closing because I'm impatient and don't want to wait for the bot to clear out the queue.