Dear all,
when calling a standard tweet page (http://drupal.publicplan.de/tweets) we get a lot of "Trying to get property of non-object" errors, e.g. for the following files/methods:
- twitter_views_handler_field_formatted_tweet->render() (Line 135 in /sites/all/modules/twitter/twitter_views_field_handlers.inc
- include() (Line 10 in /sites/all/modules/twitter/tweet.tpl.php
Any clue? We are using PHP 5.4 ans all other installed modules work fine. Surprisingly our twitter messages display correctly after the error box.
Thanks
Christian
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | twitter-propertyNonObject-1944226-15.patch | 1.38 KB | heddn |
| #10 | twitter.inc_.patch | 532 bytes | Anonymous (not verified) |
Comments
Comment #1
JRZ-2 commentedsame here...
Comment #2
sstrigger commentedThis seems to be an issue with older versions of MySQL. It fails and doesn't show the twitter message for me on 5.0.96 but works fine on 5.5.20. I believe it's because it's comparing a decimal value to a string. I replaced this code in twitter.inc and it seems to working okay.
with:
Comment #3
satter9 commentedThanks for that! It worked well for me too.
Nils
Comment #4
etara commentedI'm getting the same error. I replaced that bit of code with what you pasted above, but then I still get the error (though much shorter) and with reference to a different line in tweet.tpl.php
Comment #5
sheldon rampton commentedsstrigger's hack in #2 worked for me.
Comment #6
Mat77 commentedThanks, hack #2 worked for me too.
Should be commited to trunk!
Comment #7
artworker commented#2 hack worked for me also......Cheers!
Does anyone know if this will be included in the 7.x-6.x-dev version?
Comment #8
jvandooren commented#2 worked for me as well. Is there a specific reason why the tweet_id is a decimal anyway?
Comment #9
sheldon rampton commented@Ozmodiar: I think what has happened is that the total number of tweets in Twitter has gotten so large that the status IDs now contain more digits than some older versions of MySQL (and PHP) normally expect, so they have to be forced to expect the additional precision.
Comment #10
Anonymous (not verified) commentedThanks sstrigger, spot on!
In order to get this committed I have attached a patch.
Please commit.
Comment #11
Anonymous (not verified) commentedComment #12
goldlilys commentedI hope this gets committed soon because this problem spit out so much errors while I was away and OMG bad for business to see so much errors in the page especially when twitter is on all of my site's pages. Thanks in advance.
Comment #13
Mat77 commentedAgree with goldlilys, I updated the twitter module and got all these errors.
Took me some time to find out that I needed to apply this patch once again.
Thanks in advance to commit this on main version.
Comment #14
chrisfree commentedPatch in #10 fixed this issue for me.
Comment #15
heddnThis patch picks up another numeric field in twitter_account_load() that also needed the CAST and thereby fixed a few more of the errors.
Comment #16
xurizaemonDuplicated by #2055951: Interesting MySQL issue appears to cause randomish "twitter_views_handler_field_formatted_tweet->render()" errors, there's active discussion and similar patch there too.
Can consider the CAST solution in either issue once we have RTBC from someone who's tested that patch on non-MySQL platform.
Replacing the decimal ID with a string column might be a more sane fix?
Comment #17
leewillis77 commentedI just posted a patch to #25055951 that resolves these issues for me. It changes the database structure to a more sane structure and should avoid these issues without the need for rewriting SELECT statements at all.
Comment #18
madbeerweek commented#17 worked for me; remember to run update.php.
Comment #19
autopoietic commented#17 works for me - https://drupal.org/node/1944226
thanks lee
Comment #20
xurizaemon#2055951: Interesting MySQL issue appears to cause randomish "twitter_views_handler_field_formatted_tweet->render()" errors