I've created a patch that fixes import and views handler bugs.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xopoc’s picture

symphonia’s picture

Hello... can you tell me how to apply the patch please?

xopoc’s picture

Please, read http://drupal.org/patch/apply
This patch is very simple you can apply the patch manually.
-(minus) you should delete string
+(plus) you should add string

juampynr’s picture

Status: Needs review » Postponed (maintainer needs more info)

@xopoc, could you explain what does this patch fix?

xopoc’s picture

@juampy
Yes, of course.

I added property "is_new" to $twitter_status object. Tweets are not imported without this property.
see twitter.inc
+ $twitter_status->is_new = entity_load_single('twitter_status', $twitter_status->twitter_id) ? FALSE : TRUE;

Variable $status is not defined. There should be $twitter_status instead. Unfortuntelly function entity_load_single('twitter_account', $twitter_status->screen_name) returns FALSE, that why I use entity_load().
see twitter_views_field_handlers.inc
- $twitter_account = entity_load_single('twitter_account', $status->screen_name);
-
+ $twitter_account = entity_load('twitter_account', FALSE, array('screen_name' => $twitter_status->screen_name));
+ $twitter_account = reset($twitter_account);

juampynr’s picture

Status: Postponed (maintainer needs more info) » Fixed

Committed the Views patch. The other fix has been rewritten so twitter_account_save() is used.

http://drupalcode.org/project/twitter.git/commit/65cbf41

Thanks!

sco_tt’s picture

I've applied this patch to Twitter-7.x-6.x-dev and I'm able to import tweets but get the following error

Notice: Trying to get property of non-object in twitter_views_handler_field_formatted_tweet->render() (line 146 of/var/www/sites/all/modules/twitter/twitter_views_field_handlers.inc).
Notice: Undefined property: stdClass::$text in twitter_views_handler_field_formatted_tweet->render() (line 157 of/var/www/sites/all/modules/twitter/twitter_views_field_handlers.inc).
Notice: Trying to get property of non-object in include() (line 10 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 10 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 11 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 12 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 21 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 21 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 25 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 25 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Undefined property: stdClass::$twitter_id in include() (line 35 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Undefined property: stdClass::$twitter_id in include() (line 38 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Undefined property: stdClass::$twitter_id in include() (line 41 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in twitter_views_handler_field_formatted_tweet->render() (line 146 of/var/www/sites/all/modules/twitter/twitter_views_field_handlers.inc).
Notice: Undefined property: stdClass::$text in twitter_views_handler_field_formatted_tweet->render() (line 157 of/var/www/sites/all/modules/twitter/twitter_views_field_handlers.inc).
Notice: Trying to get property of non-object in include() (line 10 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 10 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 11 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 12 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 21 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 21 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 25 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 25 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Undefined property: stdClass::$twitter_id in include() (line 35 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Undefined property: stdClass::$twitter_id in include() (line 38 of /var/www/sites/all/modules/twitter/tweet.tpl.php).
Notice: Undefined property: stdClass::$twitter_id in include() (line 41 of /var/www/sites/all/modules/twitter/tweet.tpl.php).

I also tried cloning the latest commit via
git clone --branch 7.x-6.x http://git.drupal.org/project/twitter.git
but I'm getting the same error

juampynr’s picture

@sco_tt, your bug has been fixed in #1944174: Error with Web Intents field. The latest dev release contains the fix and this alpha release should be available within a few minutes: http://drupal.org/node/1977486

sco_tt’s picture

@juampy I'm on the alpha release. Now the first page of the view comes up without any errors (/tweets), however, if I use a page and go to tweets?page=1, the same error message shows up.

juampynr’s picture

You mean alpha2? alpha1 has those bugs.

It can also be that the view was modified. Try to revert it to defaults.

By the way. It may be better to create a new issue for this instead of discussing it in a different ticket that is already fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dndood’s picture

Hello,

I assume I am having the same problem as others above. I have tried every version of this module (recommended, other and every dev version). The module performs just fine, but on the page for viewing the tweets I get the following errors:

Notice: Trying to get property of non-object in twitter_views_handler_field_formatted_tweet->render() (line 146 of sites/all/modules/twitter/twitter_views_field_handlers.inc).
Notice: Undefined property: stdClass::$text in twitter_views_handler_field_formatted_tweet->render() (line 157 of sites/all/modules/twitter/twitter_views_field_handlers.inc).
Notice: Trying to get property of non-object in include() (line 10 of sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 10 of sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 11 of sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 12 of sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 21 of sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 21 of sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 25 of sites/all/modules/twitter/tweet.tpl.php).
Notice: Trying to get property of non-object in include() (line 25 of sites/all/modules/twitter/tweet.tpl.php).
Notice: Undefined property: stdClass::$twitter_id in include() (line 35 of sites/all/modules/twitter/tweet.tpl.php).
Notice: Undefined property: stdClass::$twitter_id in include() (line 38 of sites/all/modules/twitter/tweet.tpl.php).
Notice: Undefined property: stdClass::$twitter_id in include() (line 41 of sites/all/modules/twitter/tweet.tpl.php).

The thread above looks like the same problem and it is mentioned that it was fixed in the alpha2, but that is not working for me.

Any suggestions would be most appreciated.

mrfreshly’s picture

Solved the mystery here: https://drupal.org/node/2055951