If I run cron through the status report then I get a notice that cron fails. If I try to run cron.php directly, then I get the following error:

Fatal error: Cannot access empty property in /home/vg004web04/93/97/2009793/web/sites/all/modules/feed_field/feed_field.module on line 626

If I run the the cron feed field test then I get the following error:

Fatal error: Cannot access empty property in /home/vg004web04/93/97/2009793/web/sites/all/modules/feed_field/feed_field.module on line 682

It seems to be an issue with the following line:

$feed = $node->{$fieldname}[$delta];

Please let me know if there is any other information that you may need.

Thank you.

Comments

Anonymous’s picture

This doesn't happen in version 1.8

jawcw’s picture

Thank you Obsidiandh! Downgrading to 1.8 did the trick.

andymantell’s picture

StatusFileSize
new1.16 KB

The reason the Cron error doesn't appear in 1.8 is that it doesn't use Cron! It would be nice to know a bit of history here, as 1.7 *does* use cron. 1.8 looks like a much older version, and then 1.9 comes along with cron again... What happened?

At any rate, I don't think downgrading is really a very good solution as 1.8 fetches the updated feed items when you view the node itself, resulting in potentially quite slow page loads as Drupal makes an http request to fetch the items.

Looking at the problem, it appears that this line:

$feed = $node->{$fieldname}[$delta];

is being run with $fieldname as an empty string (certainly in my case), giving you the "cannot access empty property" errors. The attached patch changes the if statement slightly so that we can't fall through to the feed processing without an actual feed field having been found.

andymantell’s picture

Status: Active » Needs review
StatusFileSize
new1.16 KB
new1.07 KB

There is also another error with the cron code.

We have the following line:

_feed_field_refresh_items($settings->id, $field_value);

But at no point has $field_value been initialised to anything so this refresh request will fail outright. The correct variable name here is $feed.

_feed_field_refresh_items($settings->id, $feed);

By changing this line, I have successfully got cron running and refreshing feed items for the site I am working on. If you are experiencing these issues, please apply both patches from this comment.

TimelessDomain’s picture

Status: Needs review » Reviewed & tested by the community

#4 fixed the error. thanks andy

As If’s picture

Assigned: Unassigned » As If
Status: Reviewed & tested by the community » Fixed

Included in release 6.x-1.10.

As If’s picture

Status: Fixed » Closed (fixed)