Problem/Motivation

We have an XML file where the GUID is specified in the file name rather than in the XML. We're not able to change the XML feed but if we could alter the XML after it had been fetched then we could add it in

Proposed resolution

Add a new hook: hook_feeds_before_parse()
- This hook can be used to alter FeedsSource object that can be used to alter fetcher_result

API changes

hook_feeds_before_parse() for altering the fetcher_result before generating the parser result

CommentFileSizeAuthor
feeds-before-parse.patch505 bytesvhin0210
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vhin0210’s picture

Assigned: vhin0210 » Unassigned

Status: Needs review » Needs work

The last submitted patch, feeds-before-parse.patch, failed testing.

Status: Needs work » Needs review

vhin0210 queued feeds-before-parse.patch for re-testing.

Status: Needs review » Needs work

The last submitted patch, feeds-before-parse.patch, failed testing.

Josh Waihi’s picture

Status: Needs work » Needs review

I don't think these exceptions are related to this patch is it only adds a module hook. Perhaps there is some other issue with Feeds atm?

MegaChriz’s picture

Version: 7.x-2.0-alpha8 » 7.x-2.x-dev

@Josh Waihi
No, code changes should always be tested against dev.

twistor queued feeds-before-parse.patch for re-testing.

ryumkin’s picture

Subscribe! There is another motivation, like faster CSV hash check, you could just take the string row calculate it's hash rather than calculate after parsing. Should be much faster!

joachim’s picture

Status: Needs review » Needs work

A new hook needs documenting in the api.php file.