As the title say, when using ImageCache linked to node in the CCK fields display, the url used is a relative one in the RSS.
This causes a broken link from any images displayed in the RSS feed.

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

Canadaka’s picture

I also just noticed this problem, surely this must be a common problem with a solution?

ao2’s picture

Version: 6.x-2.0-beta9 » 6.x-2.0-beta10

Hi, this also leads to this message from http://feedvalidator.org/

description should not contain relative URL references: ...

At first I didn't realize it was related to the "linked node" property, this is a useful hint, thanks.

Regards,
Antonio

ekes’s picture

Version: 6.x-2.0-beta10 » 6.x-2.x-dev
Status: Active » Needs review
FileSize
2.96 KB

Imagecache uses an absolute URL for the image path, I think this avoids problems like language prefixes. It uses relative links to node, which is usually good, but not within RSS as it doesn't have a concept of base URL. The theme function doesn't know that this is being formatted for a body/teaser to be used in an RSS context.

To maintain present functionality, and add a link that will work in RSS, the attached patch adds a "@preset image linked to node (for rss)" formatter that can be selected for the RSS display of the field should the administrator wish.

mfb’s picture

Nice, one problem with this patch, however.
Due to this line in theme_imagecache_formatter_linked():

  // Extract the preset name from the formatter name.
  $presetname = substr($element['#formatter'], 0, strrpos($element['#formatter'], '_'));

the $presetname has "_linked" appended which is incorrect.

ekes’s picture

FileSize
3.03 KB

Updated to correct the #formatter when the parent preset theme function is called.

mfb’s picture

Another very minor issue, Drupal usually uses all caps for acronyms in the UI, so it should be RSS instead of rss.

mfb’s picture

FileSize
2.96 KB

rerolled #5, only change is "RSS" instead of "rss".

neelan’s picture

i used your #7 patch and enabled the display fields -> rss > thumbnail linked to node(for rss)
After that i checked in the rss code. but the image is not appearing. only the title is there in the rss xml.
(In the same time other imagecache preset also not appearing in the rss xml. while i used the old module file, the image appears in the rss)
Please help me to solve this issue. Please send me the entire module package to me for checking.

fizk’s picture

Status: Needs review » Closed (fixed)
Issue tags: -rss display +ImageCache 3

Marking as ImageCache 3.x Todo.

fizk’s picture

Status: Closed (fixed) » Active
Issue tags: -ImageCache 3 +ImageCache 2.x Todo

Marking as ImageCache 2.x Todo.

aitala’s picture

Issue summary: View changes
FileSize
3.03 KB

The patch reroll in #7 was not done on patch #5 but on patch #3 i.e. it undid the fix which would have prevented the issue listed in #8

Here is a corrected patch.