RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
20 Aug 2026

Pull Request resolves # .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Currently, when you access to a file in template manager (image, font, or archive), there is a warning in PHP error logs like below:

[20-Aug-2026 12:17:53 UTC] PHP Warning: Attempt to read property "filename" on null in D:\www\joomla\administrator\components\com_templates\tmpl\template\default.php on line 72

This PR just fixes that simple issue.

Testing Instructions

  • Uses Joomla 5.4
  • Go to System -> Global Configuration, set Error Reporting to Maximum
  • Access System -> Site Templates, click on a template to go to Template Manager screen
  • From template manager screen for that template, access to an image file (for example media/templates/site/cassiopeia/images/template_preview.png)
  • Check PHP error logs (the warning not displayed in the screen because the output for the code is hidden and that's why you need to check PHP error logs to see warning)

Actual result BEFORE applying this Pull Request

  • You see warning like below

[20-Aug-2026 12:17:53 UTC] PHP Warning: Attempt to read property "filename" on null in D:\www\joomla\administrator\components\com_templates\tmpl\template\default.php on line 72

Expected result AFTER applying this Pull Request

  • No warning anymore

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomdonation joomdonation - open - 20 Aug 2026
avatar joomdonation joomdonation - change - 20 Aug 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Aug 2026
Category Administration com_templates
avatar richard67 richard67 - change - 20 Aug 2026
Title
[5,4] Fix warning when access none source files in Template Manager
[5.4] Fix warning when access none source files in Template Manager
avatar richard67 richard67 - edited - 20 Aug 2026
avatar richard67 richard67 - test_item - 20 Aug 2026 - Tested successfully
avatar richard67
richard67 - comment - 20 Aug 2026

I have tested this item ✅ successfully on ff9fcc1


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

avatar richard67
richard67 - comment - 20 Aug 2026

I have tested this item ✅ successfully on ff9fcc1


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

avatar brianteeman brianteeman - test_item - 20 Aug 2026 - Tested successfully
avatar brianteeman
brianteeman - comment - 20 Aug 2026

I have tested this item ✅ successfully on ff9fcc1

confirmed the entry in the php error_log before this PR
Confirmed there is nothing in the php error_log after applying the PR


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

avatar brianteeman
brianteeman - comment - 20 Aug 2026

I have tested this item ✅ successfully on ff9fcc1

confirmed the entry in the php error_log before this PR
Confirmed there is nothing in the php error_log after applying the PR


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

avatar richard67 richard67 - change - 20 Aug 2026
Status Pending Ready to Commit
Labels Added: bug PR-5.4-dev
avatar richard67
richard67 - comment - 20 Aug 2026

RTC


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

avatar richard67
richard67 - comment - 20 Aug 2026

RTC


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

avatar muhme muhme - change - 27 Aug 2026
Labels Added: RTC
avatar muhme
muhme - comment - 27 Aug 2026

✅ Final test before merge with JBT

  • Seen PHP warnings before PR
  • Applied PR with Patch Tester
    • There are no longer any PHP warnings
    • Images and source code files can still be opened
avatar muhme muhme - change - 27 Aug 2026
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2026-08-27 15:41:22
Closed_By muhme
avatar muhme muhme - close - 27 Aug 2026
avatar muhme muhme - merge - 27 Aug 2026
avatar muhme
muhme - comment - 27 Aug 2026

Thank you very much @joomdonation for your contribution. Thanks to @richard67 and @brianteeman for testing.

Add a Comment

Login with GitHub to post a comment