Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled Topic is solved

Did you find a bug in Joomla! 3.x but aren't sure? This forum is the place to help figure out if the problem is a bug and how to report it. If you are an experienced Joomla! user and are certain that you have found a bug please use the Bug Tracker to submit your issue.
This forum is for discussion about bugs and to get help with reporting them to the Bug Tracker: https://issues.joomla.org

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Locked
BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Sat Jan 26, 2019 9:25 pm

Hello community, developers,

it looks like this is a bug in Joomla (router?).

If 'Show Feed Link' is set for a menu item (Blog category) in the Integration tab, then Joomla adds the feed URLs to the html header. So far so good.
But if you set 'Add Suffix to URL' to yes at the SEO settings of the Global Configuration, then Joomla generates wrong URLs for the feeds.

Example:
I have a blog category with some test articles in a local Joomla (latest Joomla V3.9.2) installation (same behavior is at an online site).
With SEF switched off the URL for the RSS feed looks like this:

Code: Select all

http://localhost/JoomDev/index.php?option=com_content&view=category&layout=blog&id=2&Itemid=251&format=feed&type=rss
With SEF enabled, the URL looks like this:

Code: Select all

http://localhost/JoomDev/index.php/blog?format=feed&type=rss
With SEF and 'Use URL Rewriting' enabled like this:

Code: Select all

http://localhost/JoomDev/blog?format=feed&type=rss
But when I enable 'Add Suffix to URL', the URL looks like this:

Code: Select all

http://localhost/JoomDev/blog.feed?type=rss
and this is wrong because the suffix (.feed) is wrong (should be .html) and the URL parameter for format is missing. My feedreader program reports that the address cannot be found.
Same error with 'Use URL Rewriting' disabled:

Code: Select all

http://localhost/JoomDev/index.php/blog.feed?type=rss
If I now change the URL manually into:

Code: Select all

Without URL Rewrite:
http://localhost/JoomDev/index.php/blog.html?format=feed&type=rss
With URL Rewrite:
http://localhost/JoomDev/blog.html?format=feed&type=rss
then everything is OK, the feedreader finds the address and displays the feed.
The same is the case with the Atom link, but with ' type=atom' as URL parameter.

That means The Feed Integration cannot be used, if in the SEO settings 'Add Suffix to URL' is set to yes, because then Joomla generates wrong URLs.

Greets!
Last edited by imanickam on Tue Jan 29, 2019 3:51 am, edited 1 time in total.
Reason: Moved topic » from Search Engine Optimization (Joomla! SEO) in Joomla! 3.x to Joomla! 3.x Bug Reporting

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 43979
Joined: Sat Apr 05, 2008 9:58 pm

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by Webdongle » Sat Jan 26, 2019 11:49 pm

Please raise a report on https://issues.joomla.org/
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Sun Jan 27, 2019 9:11 am

Webdongle wrote:
Sat Jan 26, 2019 11:49 pm
Please raise a report on https://issues.joomla.org/
Hello Webdongle,

Thanks for your answer, but I don't know how. I don't have a Github account and I don't want one.

Maybe you have an account there and want to do that?

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 43979
Joined: Sat Apr 05, 2008 9:58 pm

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by Webdongle » Sun Jan 27, 2019 10:02 am

You are the one that the bug affects not me. If you don't want to raise a report then you don't have to but the bug will go unfixed.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Sun Jan 27, 2019 10:55 am

Webdongle wrote:
Sun Jan 27, 2019 10:02 am
[...]If you don't want to raise a report then you don't have to[...]
It's not that I don't want to. I just don't want to create a Github account, which I don't need otherwise.

Anyway, thanks again for your answer!

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2850
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by SharkyKZ » Sun Jan 27, 2019 1:28 pm

The URLs are correct. Can you access the page through the browser?

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Sun Jan 27, 2019 4:14 pm

Hello SharkyKZ - thanks for your reply!

What do you mean with correct? As I described above, the URLs are not correct and the Feedreader reports that it can not be found (as a feed, cause the feedreader only parse feed xml not html).
With the browser (I tested it with different browsers) I can access the page but then, there ist the normal HTML output for the blog category and not the xml / feed output as expected (therefore the feedreader will not parse it as a feed and reports an error), unless I changed the URL(s) by hand as described above or disabled "Add Suffix to URL" in the config at the SEO / SEF settings - (only) then the browsers shows the feed output and not the html version.

The Feed integration URLs for the frontpage (menu item "Articles » Featured Articles" set as home) are correct, even if "Add Suffix to URL" is enabled, cause there is no suffix to add and the URL has the format=feed parameter e.g:

Code: Select all

http://localhost/JoomDev/?format=feed&type=rss
So if it is right and the URLs are correct (with suffix .feed) then the rendered output is not correct as html and not as feed xml. But as I described, when I change the suffix to .html and add the parameter "format=feed" to the URL, all is fine.

At my local Joomla installation, I have no additional SEO / SEF related extension installed, only core functionality. But at my online site I have the same behavior, also after I've disabled all SEO / SEF related extensions (Route 66, direct alias) - so I guess, I am not the only one affected and it's a problem with Jommla.

Greetings!

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 43979
Joined: Sat Apr 05, 2008 9:58 pm

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by Webdongle » Sun Jan 27, 2019 4:23 pm

If it bothers you that much then report it as an issue. That is the only way to get a bug fixed.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Sun Jan 27, 2019 4:36 pm

Webdongle wrote:
Sun Jan 27, 2019 4:23 pm
If it bothers you that much then report it as an issue. That is the only way to get a bug fixed.
Maybe you don't understand, or you don't want to understand why I doesn't do that (make an account on Github which I don't need otherwise) and I think it is somehow useless and much oftopic to discuss security and privacy related concerns about it with you here.

It doesn't bother me that much. In fact I can workarround that problem with URL rewriting via htaccess or e.g. rereplacer extension - but I have thought it will be helpful to report it here, not more, not less. If it does not help than it is so - sadly.

Cheers!

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 43979
Joined: Sat Apr 05, 2008 9:58 pm

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by Webdongle » Sun Jan 27, 2019 5:36 pm

I understand that you dont want to make an account on github. You are not understanding that someone needs to raise the issue before it gets fixed. I am not going to raise the issue for you. So if it is that important to you then you can raise the issue. But you are putting a lot of time and effort complaining about it without anything being done.

You might get lucky and get someone to raise the issue for you but other than that you are wasting your time posting about it.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Sun Jan 27, 2019 6:15 pm

Webdongle wrote:
Sun Jan 27, 2019 5:36 pm
You are not understanding that someone needs to raise the issue before it gets fixed. I am not going to raise the issue for you.
Thats Wrong.
At the latest since you explain it to me over and over again it is clear to me, but it was already completely clear to me the first time you wrote it. And I have also understood, that you don't want to be helpful, as you don't want to raise it at the tracker (presupposed you already have an account on Github), for the Joomla community and not for me (only) - thanks sir - for nothing!
Webdongle wrote:
Sun Jan 27, 2019 5:36 pm
You might get lucky and get someone to raise the issue for you but other than that you are wasting your time posting about it.
1. Its not for me only! And I told you before, I can workaround it but I wanted to help with this report. If it does not help, this is sad, cause this is the official forum for Joomla, Github isn't. So the conclusion is, want to be helpful and post such reports here is useless and this is sad.

2. Its up to you what you name "wasting time" - but you can not know if I have time enough or not to do such things. I just answered to the question from SharkyKZ, and I consider this not as "wasting time" to answer a direct question.

So Webdongle, I dont know whats on your mind, to construct such replies, but I consider this as YOU wasting your time! :p

EOD

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by sozzled » Sun Jan 27, 2019 6:47 pm

@BionicCube: this is a self-help forum. That means, if people have problems, we try to suggest ways they can resolve their problems but it is entirely up to those people to resolve their problems themselves based on our advice or on their own initiative. Our job is not to do someone else's work for them.

As far as this particular matter is concerned, I don't use URL suffixes. I haven't used them for the past 20 years or more. That's just my preference.

I'm not saying that you don't have a problem. I'm not saying that there's something broken in J! that needs to be fixed. I'm just saying that it's not our task, based on one report posted on the forum from one person, to report this matter to the J! developers. That's entirely a matter for you to do or not to do as you wish. 8)

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Sun Jan 27, 2019 7:30 pm

Hello sozzled, thank you for your reply!

And thank you for explaining about this forum. Then I was probably wrong, what the forum is about, also because in other forums, to e.g. Joomla extensions such messages were already gratefully accepted.

I didn't say that someone else has to report this to do my "work", but just asked if someone wants to do it. If no one wants to do it, not even confirm that it's a bug or not (except SharkyKZ), then that's the way it is - I know what I can do, if I even decide to offer feeds again.

OK, thanks again for the clarification. Then it's really useless to report bugs here if these reports don't reach the developers. And it was a misunderstanding that I was looking for help for the problem.

By the way - I use the suffixes since Joomla 1.0 with SEF extensions of that time and beyond.

Have a nice time!

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by sozzled » Sun Jan 27, 2019 7:45 pm

You're welcome. :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 43979
Joined: Sat Apr 05, 2008 9:58 pm

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by Webdongle » Sun Jan 27, 2019 7:54 pm

viewforum.php?f=728 is used to report bugs (your thread will probably be moved to that board).

If your problem was with your site and not a bug then I would have helped you resolve it.

I did try a test on my site and did find a problem. But as I have no need for rss feed I chose to spend my time solving other problems.

I merely point out that if you chose not to create a git hub ID and report the issue then you may be waiting some time before it is raised as an issue.

If you would rather spend your time creating redirects in .htaccess then that is your choice.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Sun Jan 27, 2019 8:43 pm

Hello again Webdongle.

Please forgive my misunderstanding between us. Now I understand you better too!
Thanks for the hint to the bug-report subforum. I searched for such a section, but unfortunately I didn't see it. Ashes on my head that I had not searched more and deeper - I'm sorry! Then it's really better to move the thread there.

Also thanks for the short test you did to confirm the bug. You don't have to worry about it if you don't want to and can do better with your time.

But it's also not that I'd rather spend my time setting up redirects in htaccess if it's not necessary. But I haven't decided yet if I want to offer feeds at all again, because it's not that important for me and just wanted to learn more about the possibilities of the Joomla core, what's possible with it and how to do it (before I used the Ninja feed extension. But I uninstalled it last year, because it is no longer actively developed and therefore represents a potential security risk) - and so I became aware of the bug.

It's also not that I don't have time to report the bug to Github, only I don't want to create an account there anymore if I don't really need it, because I've already been harassed with spam and phishing from there or from someone who stolen the data from there. The email address was not public and I created it especially for it, so it was unique.
From my point of view it is not very wise to leave your data everywhere just because it is possible, but this is a very idle discussion nowadays.

Greets and have a good time too!

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by sozzled » Sun Jan 27, 2019 9:00 pm

@BionicCube: I understand your reasons for not having a GitHub account and that's not a problem for me. Perhaps it's time to move on, move into the 21st century where most websites these days don't use URL suffixes? URL suffixes (e.g ".html", ".asp", ".htm") are a hang-over from the old days where URL-suffixed websites were "normal" but, these days, that's not the norm.

Anyway, it's entirely your choice. Perhaps it's a pity that URL suffixes don't work with RSS feeds—I haven't tried them myself—but, I suspect, RSS feeds are also disappearing from everyday use, too. C'est la vie.

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Sun Jan 27, 2019 9:49 pm

@ sozzled

As I said I use the suffixes since there are SEF extensions for Joomla. I've already thought about turning them off, but I've stuck with it, because as you surely know, it's another effort to rewrite the URLs and intercept all the 404s - but may its just one or two lines to rewrite it in the htaccess.

But you are right. I recognise that disapearing of the suffixes, since Wordpress blogs / webites got popular.

For me, the SEF thing with Joomla and the extensions for it was always a mess in the past, at least from time to time something does not worked as expected and I am very happy that the devs are aware of this and the core can handle (most of it) now and what I have read about the plans for Joomla 4 and the router - thanks goes to all who are involved with it and with its development!

Yes, it's a pity. Also that such a good, mature and very useful technique gradually disappears. But thats the way it goes with all that social media hype - as you said - C'est la vie! ;)

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20631
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by leolam » Tue Jan 29, 2019 3:41 am

@BionicCube. I have reported you for cross posting. You refuse to create an Issue on the Tracker and try now to get it done by the next person via this post viewtopic.php?f=9&p=3556965#p3556965. That is against the forum rules

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2850
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by SharkyKZ » Tue Jan 29, 2019 7:01 am

BionicCube wrote:
Sun Jan 27, 2019 4:14 pm
So if it is right and the URLs are correct (with suffix .feed) then the rendered output is not correct as html and not as feed xml. But as I described, when I change the suffix to .html and add the parameter "format=feed" to the URL, all is fine.
The URLs generated are correct but they aren't routed properly. Unfortunately, I can't reproduce the issue. Try posting FPA report, maybe some extension is causing this viewtopic.php?f=714&t=793531.

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Tue Jan 29, 2019 11:52 am

SharkyKZ wrote:
Tue Jan 29, 2019 7:01 am
The URLs generated are correct but they aren't routed properly. Unfortunately, I can't reproduce the issue.
Many thanks SharkyKZ for helping to clarify the issue!

So it's not a Bug from Joomla.

How stupid would it have been to report the whole thing to the Github tracker prematurely, before it is even clearly identified as a bug?

Whatever. I'll take a look at it later, but now I don't feel like dealing with it anymore, after I'm allusively accused of refusal here.

Thanks again for your help and your time!

Have a nice day!
Bye.
Last edited by BionicCube on Tue Jan 29, 2019 12:33 pm, edited 1 time in total.

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Tue Jan 29, 2019 12:20 pm

@ leolam
leolam wrote:
Tue Jan 29, 2019 3:41 am
You refuse to create an Issue on the Tracker
Thats wrong. It's just your point of view - But I will not be compelled by this to create an account at Github.
leolam wrote:
Tue Jan 29, 2019 3:41 am
and try now to get it done by the next person
Also just your point of view. I've asked, if someone can confirm if it is a bug or not and MAYBE^^ report it to the tracker (if it is a bug), cause I have NO ACCOUNT at github! And I only asked that because Webdongle hastily told me to do it - I didn't even think about it before, if it's not clear whether it's a bug at all.

If you consider this as cross posting, then that's just the way it is and you're completely free to report it.

As you possibly see, It is not a Joomla bug, and so it would have been quite nonsensical to report it to the tracker.

8)

Bye

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Tue Jan 29, 2019 2:59 pm

Just for the sake of completeness.

I've identified the problem. It was due to two plugins I had written for myself.

I've made a private class property variable for the Joomla document object for later use and set it in the plugins constructor method.
Thats not wrong from an OOP paradigm view, but it seems Joomla don't want this approach with the document object as a private property. I don't know why, cause I'm not a Joomla expert.

After changing the code, getting the document object locally in the onBeforeCompileHead method, where I need it to set css and js to the html header, all is fine now and the feed integration works like it is expected, even with the suffixes enabled.

Conclusion. It's not very clever and doesn't help anyone to tell people rashly that they should report something to Github at the tracker, if it's not clear yet whether it belongs there at all and you don't feel like taking the time to check it out first.

Many, many thanks again @SharkyKZ for your time and help to pointing this out!
You were more or less the only one who was helpful here in the thread to check if it is a Joomla bug at all and finally to find and fix it. 8)

Greets!

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2850
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by SharkyKZ » Tue Jan 29, 2019 3:19 pm

This issue has been reported before. It's wrong to fetch the document in the constructor https://github.com/joomla/joomla-cms/is ... -381106346.
You can use injected application object to retrieve the document. First declare $app:

Code: Select all

protected $app;
And when you need to fetch the document, use:

Code: Select all

$this->app->getDocument();

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Tue Jan 29, 2019 3:39 pm

SharkyKZ wrote:
Tue Jan 29, 2019 3:19 pm
This issue has been reported before. It's wrong to fetch the document in the constructor https://github.com/joomla/joomla-cms/is ... -381106346.
You can use injected application object to retrieve the document.
Wow - thank you for your fast reply, that coding example and the link to the already made report.

Now I have learned someting more about Joomla development, its request cycle and this thread may also help others - that's very nice in the end!
Last edited by BionicCube on Tue Jan 29, 2019 4:06 pm, edited 2 times in total.

BionicCube
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jun 15, 2008 8:34 pm
Location: Germany

Re: Bug: Wrong feed url(s) if 'Add Suffix to URL' is enabled

Post by BionicCube » Tue Jan 29, 2019 7:45 pm

Just for information, one more time.

I have now checked it on my online installation after I updated my plugins, and the feed integration shows the same misbehavior again. But there are more 3rd party extensions installed.

That means, other extensions cause this problem too - for whatever reason. I don't feel like analyzing this any further.


Locked

Return to “Joomla! 3.x Bug Reporting”