RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar heelc29
heelc29
18 Oct 2025

Pull Request for Issue #46311 .

Summary of Changes

Check if model state is initialized before access
This is regression from PR #45704

Testing Instructions

Follow issue description or add following code to components\com_content\tmpl\featured\default.php

$app   = \Joomla\CMS\Factory::getApplication();
$model = $app->bootComponent('com_content')->getMVCFactory()
    ->createModel('Category', 'Site', ['ignore_request' => false]);
$category = $model->getCategory();
var_dump($category::class);

Actual result BEFORE applying this Pull Request

Exception
image

Expected result AFTER applying this Pull Request

Should work again (like J5.3)
image

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar heelc29 heelc29 - open - 18 Oct 2025
avatar heelc29 heelc29 - change - 18 Oct 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Oct 2025
Category Front End com_content
avatar chmst
chmst - comment - 18 Oct 2025

Both codes work, so I give a successful test. I would keep the old-fashioned variant, it is easier to read. This model will be often read by extension developers who are not familiar with newest PHP syntax. If the new variant is used, a comment could be helpful.

avatar chmst chmst - test_item - 18 Oct 2025 - Tested successfully
avatar chmst
chmst - comment - 18 Oct 2025

I have tested this item ✅ successfully on 8c8290d


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

avatar richard67 richard67 - change - 19 Oct 2025
Labels Added: bug PR-5.4-dev
avatar richard67 richard67 - alter_testresult - 19 Oct 2025 - chmst: Tested successfully
avatar joomdonation joomdonation - test_item - 19 Oct 2025 - Tested successfully
avatar joomdonation
joomdonation - comment - 19 Oct 2025

I have tested this item ✅ successfully on b8a1198


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

avatar joomdonation joomdonation - change - 19 Oct 2025
Status Pending Ready to Commit
avatar joomdonation
joomdonation - comment - 19 Oct 2025

RTC


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

avatar richard67 richard67 - change - 19 Oct 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-10-19 08:56:16
Closed_By richard67
Labels Added: RTC
avatar richard67 richard67 - close - 19 Oct 2025
avatar richard67 richard67 - merge - 19 Oct 2025
avatar richard67
richard67 - comment - 19 Oct 2025

Thanks @heelc29 for the fix, and @chmst and @joomdonation for testing.

Add a Comment

Login with GitHub to post a comment