joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[6.1] Image not showed in tagged items list if the image has spaces in the name

Open tekvishal opened this issue 10 months ago • 14 comments

Pull Request for Issue # 44898

Summary of Changes

Made changes in this file components/com_tags/tmpl/tag/default_items.php remove htmlencode for space i.e %20 and replaced with blank space

Testing Instructions

  1. Create a article
  2. add intro image, filename shoud consist of blank space.
  3. Add tag to the article.
  4. Goto menu -> add new menu item -> select type-> tags->Tagged items
  5. Create a tagged items menu item that show the list of articles with a specific tag
  6. Enable the options "Item Images -> Show"
  7. Goto Frontend -> menu -> select newly created menu

Actual result BEFORE applying this Pull Request

Image was not visible

Expected result AFTER applying this Pull Request

image should be visible

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

tekvishal avatar Feb 22 '25 10:02 tekvishal

I have tested this item :white_check_mark: successfully on b6625f021b529168e5acf8f575d74f9474ba980e

Tested on Joomla! 5.3-dev on the test server Patch Applied using Joomla! Patch Tester

Followed instructions, works as described


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

crommie avatar Feb 22 '25 10:02 crommie

successfully tested. I manually edited the file and now the image is shown

webfeuerflo avatar Feb 22 '25 12:02 webfeuerflo

Issue fixed after patch.

dynamicsites avatar Feb 22 '25 12:02 dynamicsites

@webfeuerflo @dynamicsites Can you please mark your test as successfully and submit the test result at the Issue Tracker so the test count.

ghost avatar Feb 22 '25 12:02 ghost

This is not the correct fix. It should be using the layout

brianteeman avatar Feb 22 '25 12:02 brianteeman

I have tested this item :white_check_mark: successfully on b6625f021b529168e5acf8f575d74f9474ba980e


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

webfeuerflo avatar Feb 22 '25 12:02 webfeuerflo

I have tested this item :white_check_mark: successfully on b6625f021b529168e5acf8f575d74f9474ba980e


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

dynamicsites avatar Feb 22 '25 12:02 dynamicsites

This is not the correct fix. It should be using the layout

Not setting to RTC despite of successful tests for this reason.

@tekvishal Could you modify this PR or make a new one to do it the right way? That would be much appreciated.

richard67 avatar Feb 22 '25 13:02 richard67

Sure I'll update the PR

On Sat, 22 Feb, 2025, 6:54 pm Richard Fath, @.***> wrote:

This is not the correct fix. It should be using the layout

Not setting to RTC despite of successful tests for this reason.

@tekvishal https://github.com/tekvishal Could you modify this PR or make a new one to do it the right way? That would be much appreciated.

— Reply to this email directly, view it on GitHub https://github.com/joomla/joomla-cms/pull/44960#issuecomment-2676211184, or unsubscribe https://github.com/notifications/unsubscribe-auth/BMKL6536XOMWAMKPIIDALHD2RB3ARAVCNFSM6AAAAABXU2Y5QCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZWGIYTCMJYGQ . You are receiving this because you were mentioned.Message ID: @.***> [image: richard67]richard67 left a comment (joomla/joomla-cms#44960) https://github.com/joomla/joomla-cms/pull/44960#issuecomment-2676211184

This is not the correct fix. It should be using the layout

Not setting to RTC despite of successful tests for this reason.

@tekvishal https://github.com/tekvishal Could you modify this PR or make a new one to do it the right way? That would be much appreciated.

— Reply to this email directly, view it on GitHub https://github.com/joomla/joomla-cms/pull/44960#issuecomment-2676211184, or unsubscribe https://github.com/notifications/unsubscribe-auth/BMKL6536XOMWAMKPIIDALHD2RB3ARAVCNFSM6AAAAABXU2Y5QCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZWGIYTCMJYGQ . You are receiving this because you were mentioned.Message ID: @.***>

tekvishal avatar Feb 22 '25 13:02 tekvishal

(as mentioned in the Issue conversation -

Since this is not recommended for accessibility, SEO, and browser consistency reasons why are we even allowing it / entertaining allowing spaces in filenames? (I know I am going to get beaten up for that but figured I'd ask lol)

As mentioned by PixedBo, why don't we sanitize the file name...

It appears we have this:

use Joomla\CMS\Filesystem\File; $safeFilename = File::makeSafe($originalFilename);

or update that function if need be.

(I realize I'm clueless in coding so I apologize in advance).

exlemor avatar Feb 25 '25 02:02 exlemor

"This is not the correct fix. It should be using the layout"

Can you please help me understand what exact changes are required here?

tekvishal avatar Feb 26 '25 11:02 tekvishal

I would expect this to use the layout LayoutHelper::render('joomla.content.intro_image')

brianteeman avatar Feb 26 '25 11:02 brianteeman

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

HLeithner avatar Oct 15 '25 17:10 HLeithner

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

HLeithner avatar Oct 15 '25 18:10 HLeithner