After using this module for a few days without any errors, I've recently had the following message popping up intermittently (at first) and now permanently:

Notice: Undefined index: link in socialfeed_facebook_data() (line 253 of /Users/abockus/Documents/Composer/sites/www.velocitycu.com/modules/socialfeed/socialfeed.module).

After looking through the code, it seems as though the link is being used before checking that it exists and/or is available.

The link in question, 252-254 of socialfeed.module looks like this:

if (isset($teaser_text) && !empty($teaser_text)) {
      $message_feed['full_feed_link'] = l(t('@teaser_text', array('@teaser_text' => $teaser_text)), $facebook_entry['link'], array('attributes' => array('target' => '_blank')));
}

The code that fixed the issue looks like this:

if (isset($teaser_text) && !empty($teaser_text) && !empty($facebook_entry['link'])) {
      $message_feed['full_feed_link'] = l(t('@teaser_text', array('@teaser_text' => $teaser_text)), $facebook_entry['link'], array('attributes' => array('target' => '_blank')));
}

Checking if the link exists before using it solves my issue, but obviously does not print the link for those who may need it. In this case, it seems another way to grab said link may need to be figured out.

Comments

agbockus created an issue. See original summary.

agbockus’s picture

Issue summary: View changes

Edit: Removed unnecessary strong tag in description of issue.

g33kg1rl’s picture

I am also experiencing this issue.

g33kg1rl’s picture

bump

hemangi.gokhale’s picture

Version: 7.x-2.2 » 7.x-2.x-dev
Status: Active » Needs review
hemangi.gokhale’s picture

Status: Needs review » Fixed

Re-verified this and its working as expected. Hence marking this as fixed.

Status: Fixed » Closed (fixed)

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