Problem with feed generated liink

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Jan 21, 2013 2:40 am
Reply with quote
Report this post
Hi,

I just noticed that the link generated for the rss and atom feed, for menu items, is not correctly set.

It sets a link that looks like ".feed?type=rss" while it should be "/?format=feed?type=rss"

i.e: http://tourisme.nadorpresse.com/d%C3%A9 ... cture.html

Code: Select all
<link href="/découvrir-nador/infrastructure.feed?type=rss" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
<link href="/découvrir-nador/infrastructure.feed?type=atom" rel="alternate" type="application/atom+xml" title="Atom 1.0" />


The homepage's rss and atom feeds are correctly set :

Code: Select all
<link href="/?format=feed&amp;type=rss" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
<link href="/?format=feed&amp;type=atom" rel="alternate" type="application/atom+xml" title="Atom 1.0" />


Any idea what may cause the problem please?

Regards.
User avatar
Senior Boarder

GK User
Mon Jan 21, 2013 8:20 am
Reply with quote
Report this post
I don't this is related with template - probably it is Joomla! issue. Could you check this on default template ?
User avatar
Platinum Boarder

GK User
Mon Jan 21, 2013 12:36 pm
Reply with quote
Report this post
bkrztuk wrote:I don't this is related with template - probably it is Joomla! issue. Could you check this on default template ?


I couldn't figure out which file is generating that code, perhaps it is feed.php in ./libraries/joomla/document/feed starting from line 212 :

Code: Select all
      // Generate stylesheet links
      foreach ($this->_styleSheets as $src => $attr)
      {
         $data .= "<?xml-stylesheet href=\"$src\" type=\"" . $attr['mime'] . "\"?>\n";
      }

      // Render the feed
      $data .= $renderer->render();

      parent::render();
      return $data;
   }


I don't think it is a Joomla problem, I tested on a clean Joomla installation with the Publisher Template installed, the links are generated correctly, but in the live site that is using a quickstart installation, the problem persists..
User avatar
Senior Boarder

GK User
Mon Jan 21, 2013 1:30 pm
Reply with quote
Report this post
Hi,

I managed to find the code calling the feed line, it is stored in components/com_content/views/category/view.html.php

Code: Select all
      // Add feed links
      if ($this->params->get('show_feed_link', 1)) {
         $link = '&format=feed&limitstart=';
         $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
         $this->document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs);
         $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0');
         $this->document->addHeadLink(JRoute::_($link . '&type=atom'), 'alternate', 'rel', $attribs);
      }


I tried a few modifications to the $ link but I just couldn't figure out a fix.. Any help please?
User avatar
Senior Boarder

GK User
Mon Jan 21, 2013 2:28 pm
Reply with quote
Report this post
Ok, could only make one more test and switch template to 'Beez' on qucikstart version and check result on 'Beez' ?
User avatar
Platinum Boarder

GK User
Mon Jan 21, 2013 2:45 pm
Reply with quote
Report this post
bkrztuk wrote:Ok, could only make one more test and switch template to 'Beez' on qucikstart version and check result on 'Beez' ?

Same problem, output is :
Code: Select all
  <link href="/découvrir-nador/infrastructure.feed?type=rss" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
  <link href="/découvrir-nador/infrastructure.feed?type=atom" rel="alternate" type="application/atom+xml" title="Atom 1.0" />
User avatar
Senior Boarder

GK User
Mon Jan 21, 2013 2:54 pm
Reply with quote
Report this post
I made one more test and turned off showing the url suffix from the global configuration, and the problem seem to be related to the page suffix.

When turned ON, the .html causes the problem and url is set to ".feed" instead of "?format=feed"

When turned OFF, the .html is gone and the url is set to "/category_link?format=feed&type=rss"

I need to turn ON and show the page suffix, any idea how we could fix the problem ?
User avatar
Senior Boarder

GK User
Tue Jan 22, 2013 10:14 am
Reply with quote
Report this post
If the same happen on 'Beez' it looks like problem with Joomla!. Did you try to submit issue on Joomla! bugtracker ?
User avatar
Platinum Boarder

GK User
Tue Jan 22, 2013 3:59 pm
Reply with quote
Report this post
bkrztuk wrote:If the same happen on 'Beez' it looks like problem with Joomla!. Did you try to submit issue on Joomla! bugtracker ?

Hi,

I have made some more tests and noticed that even on a clean joomla installation when you turn ON the "Adds Suffix to URL" from the global configuration, the feed url is messed up for all pages but the home page.

Submitting a bug to joomla now..
User avatar
Senior Boarder


cron