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
Comment #2
agbockus commentedEdit: Removed unnecessary strong tag in description of issue.
Comment #3
g33kg1rl commentedI am also experiencing this issue.
Comment #4
g33kg1rl commentedbump
Comment #6
hemangi.gokhaleComment #7
hemangi.gokhaleRe-verified this and its working as expected. Hence marking this as fixed.