I have forked Joomla's feed display module (mod_feed) for my needs. It was working well until I have updated my site from 3.3.6 to 3.4.1.

I have news source which I have displayed on my Joomla site. RSS feed is as the following:

    <atom:link href="http://example.com/?feed=rss2" rel="self" type="application/rss+xml" />
    <description>Zkanoca loves you</description>
    <lastBuildDate>Fri, 27 Mar 2015 06:02:13 +0000</lastBuildDate>
        <title>My news title 1</title>
        <pubDate>Thu, 26 Mar 2015 11:43:56 +0000</pubDate>
        <guid isPermaLink="false">http://example.com/?p=142862</guid>
        <description><![CDATA[Some text is here]]></description>
        <content:encoded><![CDATA[<p>Some text is here</p>
        <a href='http://example.com/?attachment_id=142863'><img width="150" height="150" src="http://example.com/wp-content/uploads/2015/03/0124-150x150.jpg" class="attachment-thumbnail" alt="01" /></a>
        <a href='http://example.com/?attachment_id=142864'><img width="150" height="150" src="http://example.com/wp-content/uploads/2015/03/0224-150x150.jpg" class="attachment-thumbnail" alt="02" /></a>]]></content:encoded>



part was not in original feed XML. I have added it with a little hack on Wordpress.

I have changed Joomla's mod_feed module in order to have a sliding news module, utilizing Bootstrap's carousel component.

It was properly working. But after I have updated the web site <picture> node comes empty so the carousel is unable to display the news' picture.

I have tried to search what has been changed from Joomla API directory. But could not find a clue.

I am trying to display the image using that line:

<img src="<?php echo $feed[$i]->picture; ?>" alt="<?php echo $feed[$i]->title; ?>" />

and it outputs as

<img src="/" alt="My news title 1" />

Before updating it used to show the picture properly. My carousel code is as the following:

<div class="carousel-inner">
        $active = 'active';
        for ($i = 0; $i < $params->get('rssitems', 5); $i++) :
            if (!$feed->offsetExists($i)) {break;}
            $uri = (!empty($feed[$i]->uri) || !is_null($feed[$i]->uri)) ? $feed[$i]->uri : $feed[$i]->guid;
            $uri = substr($uri, 0, 4) != 'http' ? $params->get('rsslink') : $uri; ?>
            <div class="item <?php echo $active; ?>">
                <img src="<?php echo $feed[$i]->picture; ?>" alt="<?php echo $feed[$i]->title; ?>" />
                <div class="container">
                    <div class="carousel-caption">
                        <h2><a href="<?php echo $feed[$i]->uri; ?>" target="_blank"><?php echo $feed[$i]->title; ?></a></h2>
             $active = ''; 

1 Answer 1


After a deep investigation, I have found that I had modified libraries/joomla/feed/feed.php adding picture key to the $properties array:

    protected $properties = array(
    'uri' => '',
    'title' => '',
    'updatedDate' => '',
    'description' => '',
    'categories' => array(),
    'contributors' => array(),
    'picture' => '' //this line

I have also found that I had changed libraries/joomla/feed/parser/rss.php Added keys respectively where needed. For example:

//line 112
protected function handlePicture(JFeed $feed, SimpleXMLElement $el) {
    $feed->picture = (string) $el;


//line 355
    protected function processFeedEntry(JFeedEntry $entry, SimpleXMLElement $el) {
    $entry->uri = (string) $el->link;
    $entry->title = (string) $el->title;
    $entry->publishedDate = (string) $el->pubDate;
    $entry->updatedDate = (string) $el->pubDate;
    $entry->content = (string) $el->description;
    $entry->guid = (string) $el->guid;
    $entry->comments = (string) $el->comments;
    $entry->picture = (string) $el->picture;

After modifying current version's files according to previous version's it works now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.