When a redirected feed is not parseable Aggregator saves a watchdog entry saying "Updated URL for feed ... to ...." however the feed data remains unchanged in the database.

Attached patch saves watchdog entry after feed data is updated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

Version: 7.x-dev » 6.x-dev
Status: Needs review » Needs work

I've committed this to CVS HEAD. The patch didn't apply to DRUPAL-6 so I did not commit it to Drupal 6. I'll lower the version module and mark it 'code needs work'.

catch’s picture

Status: Needs work » Patch (to be ported)

Probably better as 'to be ported'.

mustafau’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.17 KB

Patch for DRUPAL-6.

mustafau’s picture

Version: 6.x-dev » 7.x-dev
FileSize
1.16 KB
690 bytes

We only update URL if redirect is permanent (status 301). Previous patch called watchdog for 301, 302, 307.

Attached patch fixes the problem. Patch for DRUPAL-6 is also attached.

Patch failed to apply. More information can be found at http://testing.drupal.org/node/13868. If you need help with creating patches please look at http://drupal.org/patch/create

mustafau’s picture

Patch is fine. Testbed tried to apply patch for DRUPAL-6 to HEAD.

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

Kars-T’s picture

The code for D7 is now:

      // Log if feed URL has changed.
      if ($feed->url != $feed_url) {
        watchdog('aggregator', 'Updated URL for feed %title to %url.', array('%title' => $feed->title, '%url' => $feed->url));
      }

This still does not check for status 301 but if the url did change. To me it still seems wise to change the code to check for http 301 and not the url but maybe someone does know better and close this issue / set it back to D6 which still applies?

  • Dries committed 6e882d8 on 8.3.x
    - Patch #293532 by mustafau: when a redirected feed is not parseable...

  • Dries committed 6e882d8 on 8.3.x
    - Patch #293532 by mustafau: when a redirected feed is not parseable...

  • Dries committed 6e882d8 on 8.4.x
    - Patch #293532 by mustafau: when a redirected feed is not parseable...

  • Dries committed 6e882d8 on 8.4.x
    - Patch #293532 by mustafau: when a redirected feed is not parseable...

  • Dries committed 6e882d8 on 9.1.x
    - Patch #293532 by mustafau: when a redirected feed is not parseable...