joomla-cms
joomla-cms copied to clipboard
[4.4] Feed: Fixing link selection of AtomParser
Pull Request for Issue #38631 .
Summary of Changes
The feed parser for Atom feeds is selecting the wrong link as described in the original issue.
Testing Instructions
Copied from the original issue:
- Create new Feed Display module
- Set Feed URL to a Blogger Atom Feed eg
https://www.failureasaservice.com/feeds/posts/default
Actual result BEFORE applying this Pull Request
Link is created using the first entry <link rel="replies"> which is an XML feed and not useful for normal users who just want to jump over to your post on Blogger.com.
<link rel="replies" type="application/atom+xml" href="https://www.failureasaservice.com/feeds/921417709640098202/comments/default" title="Post Comments"/>
<link rel="replies" type="text/html" href="https://www.failureasaservice.com/2020/10/amd-killed-arm-in-data-center.html#comment-form" title="0 Comments"/>
<link rel="edit" type="application/atom+xml" href="https://www.blogger.com/feeds/3991757369876144735/posts/default/921417709640098202"/>
<link rel="self" type="application/atom+xml" href="https://www.blogger.com/feeds/3991757369876144735/posts/default/921417709640098202"/>
<link rel="alternate" type="text/html" href="https://www.failureasaservice.com/2020/10/amd-killed-arm-in-data-center.html" title="AMD Killed ARM in the Data Center"/>
Expected result AFTER applying this Pull Request
Links should use the <link rel="alternate"> entry creating a clickable jump back to the Blogger page.
Link to documentations
Please select:
-
[ ] Documentation link for docs.joomla.org:
-
[X] No documentation changes for docs.joomla.org needed
-
[ ] Pull Request link for manual.joomla.org:
-
[X] No documentation changes for manual.joomla.org needed
Without the pr a click on 'FaaS - Failure as a Service' and 'AMD Killed ARM in the Data Center' opens
PR applied only the first link opens the above window.
I have tested this item :white_check_mark: successfully on 231e36014e46e47faf3460ed9602078e1666083b
The links on the feed headlines go to the article html pages. that is good.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42706.
Hi @Hackwar i'm testing this PR but i don't see a change in the dom of the urls of the blog items in the feed. they all have rel="noopener" even after applying the patch. But i do notice a change in behaviour as that now it opens the actual article instead of the feed link when clicking on the items. Seems like a half successfull test no?
@TLWebdesign that is the expected behavior, so your test would be successfull.
I have tested this item :white_check_mark: successfully on 231e36014e46e47faf3460ed9602078e1666083b
Tested successfully
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42706.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42706.
Thank you!