Some RSS feed channel images are rendered too large in External feeds block

Bug #1219499 reported by Geoffrey Rowland
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Robert Lyon
1.5
Fix Released
Medium
Robert Lyon
1.6
Fix Released
Medium
Robert Lyon
1.7
Fix Released
Medium
Robert Lyon

Bug Description

Some RSS/Atom feeds provide an over-large channel image/logo which disrupts display of the External Feed block in a Mahara Page.

See e.g. this feed link from the BBC
http://downloads.bbc.co.uk/podcasts/worldservice/digitalp/rss.xml

Obviously this is an issue with the feed source rather than Mahara per se. However, the suggested solution is to set CSS max-width style attribute and max-height style attributes to the channel image.

Will simply need, say, an appropriate CSS class added to htdocs > blocktype > externalfeed > theme > raw > feed.tpl and related .css entry

The RSS 2.0 spec defines a max-width of 144px (default 88px) and max-height of 400px (default 31px). So, these would be reasonable values.

http://cyber.law.harvard.edu/rss/rss.html#ltimagegtSubelementOfLtchannelgt

Thanks
Geoff

Mahara version 1.7.2 running on CentOS 6
Database: MySQL
Using recent versions of Firefox, Chrome or Opera on Windows 7 or Fedora 19

Tags: rss
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hello Geoff,

Thank you for the report. I'll ask our designer to look into this and see if she can simply change the CSS or if dev work is needed.

Cheers
Kristina

Changed in mahara:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Robert Lyon (robertl-9) wrote :
Changed in mahara:
status: Triaged → In Progress
Changed in mahara:
milestone: none → 1.8.0rc1
assignee: nobody → Robert Lyon (robertl-9)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/2457
Committed: http://gitorious.org/mahara/mahara/commit/2fe1a62dd2ef7b474e614e23a9f47ed2c9fb8065
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 2fe1a62dd2ef7b474e614e23a9f47ed2c9fb8065
Author: Evonne Cheung <email address hidden>
Date: Mon Sep 2 15:01:58 2013 +1200

Rss images rendering too large in external feed block (Bug #1219499)

Some RSS/Atom feeds provide an over-large channel image/logo which
disrupts display of the External Feed block in a Mahara Page.

See e.g. this feed link from the BBC
http://downloads.bbc.co.uk/podcasts/worldservice/digitalp/rss.xml

Change-Id: Ib6db4b1261abbf6feefabccddb60adad605d9a25

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Robert Lyon (robertl-9) wrote :
Revision history for this message
Robert Lyon (robertl-9) wrote :

The problem where some images are not showing up is because they tend to be protocol relative urls to the images and the Mahara system tries to append a url to them but this makes the path incorrect.

eg for slideshare (http://www.slideshare.net/rss/latest)

There are image links in the feed like:

//cdn.slidesharecdn.com/ss_thumbnails/lptrnhc2008cbnnhtnghththutit360-130902225125-phpapp02-thumbnail-2.jpg

and mahara sees this as a relative url and appends http://www.slideshare.net/ to the front if it which then makes

http://www.slideshare.net//cdn.slidesharecdn.com/ss_thumbnails/lptrnhc2008cbnnhtnghththutit360-130902225125-phpapp02-thumbnail-2.jpg

which is an incorrect url and the image will not be found there

Need to alter the code in htdocs/blocktype/externalfeed/lib.php from /src="(\/[^"]+)"/ to something that doesn't try and update protocol relative urls

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Good catch, Robert! It's looking like we'll see more and more of these scheme-relative URLs.

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2460
Committed: http://gitorious.org/mahara/mahara/commit/c19103d90fc3772e51b3a206c92bfda0761ee9e3
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.5_STABLE

commit c19103d90fc3772e51b3a206c92bfda0761ee9e3
Author: Evonne Cheung <email address hidden>
Date: Mon Sep 2 15:01:58 2013 +1200

Rss images rendering too large in external feed block (Bug #1219499)

Some RSS/Atom feeds provide an over-large channel image/logo which
disrupts display of the External Feed block in a Mahara Page.

See e.g. this feed link from the BBC
http://downloads.bbc.co.uk/podcasts/worldservice/digitalp/rss.xml

Change-Id: Ib6db4b1261abbf6feefabccddb60adad605d9a25

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2458
Committed: http://gitorious.org/mahara/mahara/commit/d4eec44ae2c0316b5f37a5b6c4e41018db598a95
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.7_STABLE

commit d4eec44ae2c0316b5f37a5b6c4e41018db598a95
Author: Evonne Cheung <email address hidden>
Date: Mon Sep 2 15:01:58 2013 +1200

Rss images rendering too large in external feed block (Bug #1219499)

Some RSS/Atom feeds provide an over-large channel image/logo which
disrupts display of the External Feed block in a Mahara Page.

See e.g. this feed link from the BBC
http://downloads.bbc.co.uk/podcasts/worldservice/digitalp/rss.xml

Change-Id: Ib6db4b1261abbf6feefabccddb60adad605d9a25

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2459
Committed: http://gitorious.org/mahara/mahara/commit/8489ecd433190b7c0d6183ce14df0919bc8711fc
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.6_STABLE

commit 8489ecd433190b7c0d6183ce14df0919bc8711fc
Author: Evonne Cheung <email address hidden>
Date: Mon Sep 2 15:01:58 2013 +1200

Rss images rendering too large in external feed block (Bug #1219499)

Some RSS/Atom feeds provide an over-large channel image/logo which
disrupts display of the External Feed block in a Mahara Page.

See e.g. this feed link from the BBC
http://downloads.bbc.co.uk/podcasts/worldservice/digitalp/rss.xml

Change-Id: Ib6db4b1261abbf6feefabccddb60adad605d9a25

Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8rc1 → 1.8.0
Revision history for this message
Aaron Wells (u-aaronw) wrote :

I've opened a separate bug for the issue with protocol-relative image URLs in RSS feeds, which Robert described in comment #5 above. https://bugs.launchpad.net/mahara/+bug/1234582

Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.