I've recently faced a empty Twitter feed empty block on one of my sites. I checked the error reports and found the following warning message:
...
USER: Anonymous
LOCATION: http://mysite.com/index.php
REFERENCE:
MESSAGE: Error when retrieving tweets.
...
After some goggling I found that Twitter has recently changed the feeds link structure: GET statuses/user_timeline.
So I modified line 23 on the twitter_db.api.inc file from
$rss_url = "http://twitter.com/statuses/user_timeline/{$retrieve_name}.xml";
to
$rss_url = "https://api.twitter.com/1/statuses/user_timeline/{$retrieve_name}.xml";.
Now I have the block working as before!
But, when looking at the error report log I now see the following warning message:
...
USER: Anonymous
LOCATION: http://mysite.com/index.php
REFERENCE:
MESSAGE: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '216310226167660544' for key 'PRIMARY'
...(the duplicate entry value changes on each warning message)
So, I believe that my fix is needs some additional work as it seems to be messing with the database tables. Unfortunately my programming knowledge is very basic to go any further, so I leave it to the more savvy.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | kogo.jpg | 131.47 KB | gatisozols |
| #6 | Problem with twitter db.png | 129.14 KB | aroliva |
| #4 | FireShot Screen Capture #007 - 'Twitter DB I localhost' - localhost_twitter_test_#overlay=admin_config_media_twitter-db.pdf | 24.61 KB | aroliva |
Comments
Comment #1
dhavyd commentedHi! Thank you for your feedback! I'll look at that problem and I will try to release a fix the next week...
Comment #2
dhavyd commentedI fixed it now on version 7.x-1.0-rc3. I coundn't reproduce the "SQLSTATE[23000]" problem. The new release seems to work for me. I close this issue, but you can please test if this release solves your problem. If not, create a new issue specific for the database issue... Thanks for your feedback!
Comment #3
aroliva commentedwhen i copy the new version of the module in my project i found this:
Fatal error: Call to undefined function _twitter_db_generate_content() in C:\xampp\htdocs\drupal-7.15\sites\all\modules\twitter_db\twitter_db.module on line 79
Comment #4
aroliva commentedIn the .pdf file i show you the message that i recieve when i link update database
Comment #5
dhavyd commentedIt's very strange... I updated Twitter DB to the the latest release (7.x-1.0-rc3) in one of my sites and it worked without problem. I even installed the module in another site that hadn't it and I could retrieve all tweets there as well. Have you clear your site cache? Can you try to upload a screenshot of your error message that you get when you try to update the database or try to rename the PDF and attach it again? I cannot download the PDF you attached above. I think the file name causes "Page not found".
One more question: Did you have any earlier release than rc2 installed when you upgraded/installed to rc3? If yes, you have to totally uninstall the any previous version to install rc2 or later.
Comment #6
aroliva commenteddhavyd, there´s an screenshot of the problem, i clean the site cache and i get the same. I create a new site only to test the module and nothing, it is posible that the conection affect the performance of the module?
Comment #7
dhavyd commentedHi again! I've more tests and can't reproduce this error in the image above. This error message you get comes from Drupal batch (the progress bar that appears when the tweets are been retrieved). I tested in 3 different D7 sites with your user_timeline (cubadebate) and it worked in all of them. I got the same error as you once when I tested through my mobile connection and the internet got down. Then I got that message because Twitter DB couldn't retrieve the tweets because of my computer hadn't any internet connection (the mobile connection had got down).
But, every time I did have a connection, I could retrieve all tweets from your user_timeline (cubadebate). So, I don't know how to reproduce the problem you've experienced...
Comment #8
gatisozols commentedHi there, same thing for me @kogo_lv.. Using Twitter DB 7.x-1.0-rc3. Cash cleaned.. Any suggestions? Didn't tried earlier versions..
Comment #9
dhavyd commentedHi! I have just released a newer version of the module (7.x-1.1-rc1). Try it and let me know if your problem be solved... Keep in mind the latest release works a little differently and you will need to create an application on Twitter to get it work. It is because Twitter has changed its API and all Twitter modules that use the old API will stop working. The latest Twitter DB release uses Twitter's new API.
Read more here: https://dev.twitter.com/blog/planning-for-api-v1-retirement