fbpx
Home  /  Blog  /  News  /  How to fix the read more links, in Joomla RSS Feeds

How to fix the read more links, in Joomla RSS Feeds

The problem is that in the default Joomla RSS feed, can’t get the full urls, and returns 404 error links from 3rd party RSS readers like feedly, feedburner etc.

For example:

ERROR READ MORE LINK => “/latest-news/62-demo-article.html”

THE CORRECT MUST BE: => “http://www.mydomain.com/latest-news/62-demo-article.html”

HOW TO FIX IT:

STEP 1.

Open the file: “/components/com_content/views/featured/view.feed.php”, lines ~98.

Find:

$description .= '<p class="feed-readmore"><a target="_blank" href ="' . $item->link . '">' . JText::_('COM_CONTENT_FEED_READMORE') . '</a></p>';

Replace with:

$new_base_url = JURI::base();
$new_base_url = preg_replace('//$/', '', $new_base_url);
$new_full_link = $new_base_url.$item->link;
$description .= '<p class="feed-readmore"><a target="_blank" href ="' . $new_full_link . '">' . JText::_('COM_CONTENT_FEED_READMORE') . '</a></p>';

STEP 2.

Open the file: “/components/com_content/views/category/view.feed.php”, lines ~51.

Find:

$item->description .= '<p class="feed-readmore"><a target="_blank" href ="' . $link . '">' . JText::_('COM_CONTENT_FEED_READMORE') . '</a></p>';

Replace with:

$new_base_url = JURI::base();
$new_base_url = preg_replace('//$/', '', $new_base_url);
$new_full_link = $new_base_url.$link;
$item->description .= '<p class="feed-readmore"><a target="_blank" href ="' . $new_full_link . '">' . JText::_('COM_CONTENT_FEED_READMORE') . '</a></p>';

Do not keep in mind the above solution if you do not use the “Read more” separator button in your articles.

If you have any further questions or any difficulties with the suggested solution above, feel free to contact us or leave a comment in form below.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are a young team of professionals and internet lovers who specialise in the development of professional websites and premium plugins for WordPress and Joomla! CMS.
Copyright © 2019 Web357. All Rights Reserved.
Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries.
Web357 is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.