Notice: Undefined variable: original_author in _parser_common_syndication_atom10_parse() (line 198 of {}/sites/all/modules/feeds/libraries/common_syndication_parser.inc).

I think some feeds I'm importing does not have an author name.

Seems like inserting $original_author = ''; above line 178 will fix this.

(Sorry for the lack of a patch.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gbirch’s picture

With apologies for bad formatting, here's a quick patch implementing the suggestion above. Seems to work nicely.

twistor’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: Feeds-undefined_original_author-2117535-1.patch, failed testing.

gbirch’s picture

I posted the patch simply as a quick guide to others. It failed testing because not rolled against dev, and has wrong formatting. Apologies, but I don't have time to set it up correctly.

gbirch’s picture

This patch should be properly formatted.

cbfannin’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha8
Priority: Normal » Minor
FileSize
628 bytes

This was happening to me in alpha8 except on different lines. I've created a new patch to accommodate the different version. It doesn't look like most feeds used from Google Alerts has original authors being that they are pulled in from all over the web. Leaving the original author empty throws the undefined variable error. Initializing $original_author with an empty string does the trick.

batje’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
500 bytes

Patch against beta-1

Also, this patch really works and it is fixing a genuine bug. Time to commit this.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: feeds-undefined-variable-original-author-2117537-7.patch, failed testing.

twistor’s picture

Version: 7.x-2.0-alpha8 » 7.x-2.x-dev
Status: Needs work » Needs review

This should also remove the $author_found variable.

The last submitted patch, 6: feeds-undefined-variable-original-author-2117537-6.patch, failed testing.

twistor’s picture

Status: Needs review » Needs work

This should remove the $author_found and just check $original_author.

serhii.ua’s picture

Status: Needs work » Needs review
FileSize
840 bytes

This is a new patch. $original_author is checked only.

MegaChriz’s picture

Thanks for the patch, id.alan.

I added a test for this bug. The first patch is meant to demonstrate the bug and should fail. The second patch should pass.

MegaChriz’s picture

Status: Needs review » Fixed

Committed #14.

  • MegaChriz committed 5d83895 on 7.x-2.x authored by id.alan
    Issue #2117535 by gbirch, MegaChriz, cbfannin, batje, id.alan: fixed...

Status: Fixed » Closed (fixed)

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