Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.)
Comments
Comment #1
gbirch CreditAttribution: gbirch commentedWith apologies for bad formatting, here's a quick patch implementing the suggestion above. Seems to work nicely.
Comment #2
twistor CreditAttribution: twistor commentedComment #4
gbirch CreditAttribution: gbirch commentedI 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.
Comment #5
gbirch CreditAttribution: gbirch commentedThis patch should be properly formatted.
Comment #6
cbfannin CreditAttribution: cbfannin commentedThis 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.
Comment #7
batje CreditAttribution: batje commentedPatch against beta-1
Also, this patch really works and it is fixing a genuine bug. Time to commit this.
Comment #9
twistor CreditAttribution: twistor as a volunteer commentedThis should also remove the $author_found variable.
Comment #12
twistor CreditAttribution: twistor as a volunteer commentedThis should remove the $author_found and just check $original_author.
Comment #13
serhii.ua CreditAttribution: serhii.ua commentedThis is a new patch. $original_author is checked only.
Comment #14
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedThanks 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.
Comment #16
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedCommitted #14.