RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Technicalleigh
Technicalleigh
10 Jun 2025

Pull Request for Issue #46131

Summary of Changes

Fixes a regex to prevent double-slashes in the URLs for intro images used in RSS and Atom feeds

Testing Instructions

In the admin interface of a fresh Joomla installation:

  1. Admin: Open Menus > Main Menu and create a new menu item:
  • Title: test
  • Menu item type: Articles > Category List
  • Category: Uncategorised
  1. Admin: Create a new article:
  • Title: test page
  • Content: lorem ipsum
  • Intro image: /images/sampledata/cassiopeia/nasa1-1200.jpg
  1. Site: Click "test" in the Main Menu
  2. View page source to get the RSS or Atom feed URL
  3. Download the feed and open it in a text editor

Actual result BEFORE applying this Pull Request

<description><![CDATA[<p><img src="https://example.com//images/sampledata/cassiopeia/nasa1-1200.jpg" alt="" width="1200" height="400" loading="lazy"></p><p>lorem ipsum</p>]]></description>

Expected result AFTER applying this Pull Request

<description><![CDATA[<p><img src="https://example.com/images/sampledata/cassiopeia/nasa1-1200.jpg" alt="" width="1200" height="400" loading="lazy"></p><p>lorem ipsum</p>]]></description>

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Notes

I couldn't figure out why this happens for the Intro Image but not any other images in an article. I only happened to notice it because the RSS reader I use doesn't try to fix malformed URLs. :) I did some additional testing to ensure my fix doesn't interfere with any other links in the feed -- it looks good to me, but I'm no expert so please check closely.

Thank you for all your work on this project!

avatar Technicalleigh Technicalleigh - open - 10 Jun 2025
avatar Technicalleigh Technicalleigh - change - 10 Jun 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Jun 2025
Category Libraries
avatar Technicalleigh Technicalleigh - change - 10 Jun 2025
The description was changed
avatar Technicalleigh Technicalleigh - edited - 10 Jun 2025
avatar Technicalleigh Technicalleigh - change - 24 Jul 2025
Labels Added: PR-5.3-dev
avatar exlemor
exlemor - comment - 1 Aug 2025

@Technicalleigh Hi there, I confirm that there is no double / thanks to your PR, but unfortunately for me on one of my test sites, it's not working 100%. I think it is perhaps because I am running Joomla from a sub-folder (one of my testing environments is setup as such on purpose)...

BEFORE PATCH:
https://www.mydomain.com/_j532//_j532/images/sampledata/cassiopeia/nasa1-1200.jpg

AFTER PATCH
https://www.mydomain.com/_j532/_j532/images/sampledata/cassiopeia/nasa1-1200.jpg

(but neither show the image of course even though what I expect:
https://www.mydomain.com/_j532/images/sampledata/cassiopeia/nasa1-1200.jpg does show the image).

avatar HLeithner HLeithner - change - 31 Aug 2025
Title
Fix regex in DocumentRenderer.php
[5.3] Fix regex in DocumentRenderer.php
avatar HLeithner HLeithner - edited - 31 Aug 2025
avatar Technicalleigh
Technicalleigh - comment - 19 Sep 2025

@Technicalleigh Hi there, I confirm that there is no double / thanks to your PR, but unfortunately for me on one of my test sites, it's not working 100%. I think it is perhaps because I am running Joomla from a sub-folder (one of my testing environments is setup as such on purpose)...

Yes, that's a totally separate issue from this regex. I think you'd need to look into the function called to set the '$base' variable on line 76.

avatar Technicalleigh Technicalleigh - change - 19 Sep 2025
Labels Added: bug
avatar Technicalleigh Technicalleigh - change - 19 Sep 2025
The description was changed
avatar Technicalleigh Technicalleigh - edited - 19 Sep 2025
avatar Aaqilyousuf
Aaqilyousuf - comment - 20 Sep 2025

Hi @exlemor, Should I open a separate issue for the RSS feed sub-folder image URL problem, or is this already being tracked?

avatar richard67 richard67 - change - 20 Sep 2025
The description was changed
avatar richard67 richard67 - edited - 20 Sep 2025
avatar richard67 richard67 - change - 20 Sep 2025
The description was changed
avatar richard67 richard67 - edited - 20 Sep 2025
avatar HLeithner
HLeithner - comment - 15 Oct 2025

This pull request has been automatically rebased to 5.4-dev.

avatar richard67 richard67 - change - 2 Nov 2025
Title
[5.3] Fix regex in DocumentRenderer.php
[5.4] Fix regex in DocumentRenderer.php
avatar richard67 richard67 - edited - 2 Nov 2025
avatar richard67 richard67 - change - 2 Nov 2025
Labels Added: PR-5.4-dev
Removed: PR-5.3-dev
avatar RickR2H RickR2H - test_item - 8 Dec 2025 - Tested successfully
avatar RickR2H
RickR2H - comment - 8 Dec 2025

I have tested this item ✅ successfully on c1e12db

Had a problem with a site which had multiple RSS feeds. Tested on the live site and problem is fixed.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45592.

avatar KasperHeuer KasperHeuer - test_item - 8 Dec 2025 - Tested successfully
avatar KasperHeuer
KasperHeuer - comment - 8 Dec 2025

I have tested this item ✅ successfully on c1e12db


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45592.

avatar richard67 richard67 - change - 8 Dec 2025
Status Pending Ready to Commit
Build 5.3-dev 5.4-dev
avatar richard67
richard67 - comment - 8 Dec 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45592.

avatar muhme muhme - change - 8 Dec 2025
Labels Added: RTC
avatar muhme
muhme - comment - 9 Dec 2025

Final test before merge with JBT

  • Installed Blog Sample Data
  • Checked http://localhost:7054?format=feed&type=rss
    • Applied PR with gh pr checkout 45592
    • img src URL doubled slashes are reduced to one, nothing else changed (checked with char comparisation e.g. git diff --no-index --color --word-diff --word-diff-regex=. rMQ44jik WsWryuaj)
  • Checked http://localhost:7054?format=feed&type=atom
    • Checked w/ and w/o PR by git switch -
    • img src URL doubled slashes are reduced to one, nothing else changed
  • ⚠️ In both feeds there is still one doubled slash existing:
      <link rel="self" type="application/atom+xml" href="http://localhost:7054//index.php?format=feed&amp;type=atom"/>
    

@Technicalleigh is this doubled slash easy to fix and related to this PR? Then I will wait, else I can merge this PR and create an issue.

avatar RickR2H
RickR2H - comment - 9 Dec 2025

@muhme Only the image URL's are controlled in this file. I also noticed the other double slashes. An other thing I noticed is that when Joomla is installed in a sub folder, the sub folder name gets added two times in the atom/rss URL. Maybe we have to address this in a separate PR.

avatar muhme muhme - change - 9 Dec 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-12-09 15:59:38
Closed_By muhme
avatar muhme muhme - close - 9 Dec 2025
avatar muhme muhme - merge - 9 Dec 2025
avatar muhme
muhme - comment - 9 Dec 2025

Thank you @Technicalleigh for your contribution. Thank you @RickR2H and @KasperHeuer for testing. Thank you @exlemor and @Aaqilyousuf for supporting this PR.

I will create an issue for link rel="self" href doubled slashes. @Aaqilyousuf or @exlemor could one of you create one for subfolder doubled slashes?

avatar RickR2H
RickR2H - comment - 9 Dec 2025

@muhme I'll create the one for the double folder names.

Add a Comment

Login with GitHub to post a comment