RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Denitz
Denitz
10 Jul 2025

Summary of Changes

BaseDatabaseModel uses Model\AfterCleanCacheEvent event class to dispatch default onContentCleanCache event.

But this event class is not registered for this event name.

Hence, old-style (legacy) dispatching like:

$options = array(
    'defaultgroup' => 'com_plugins',
    'cachebase' => $jconf->get('cache_path', JPATH_SITE . '/cache')
);
$app->triggerEvent('onContentCleanCache', $options);

will use default Event class, while for consistency, we should have Model\AfterCleanCacheEvent class.

Testing Instructions

Register own listener for onContentCleanCache event using Model\AfterCleanCacheEvent param class:

public function onContentCleanCache(Model\AfterCleanCacheEvent $event)

Execute old-style event dispatch without event instance like above.

Actual result BEFORE applying this Pull Request

See invalid param type error, $event is instance of Event class.

Expected result AFTER applying this Pull Request

No errors, the $event is instance of Model\AfterCleanCacheEvent.

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar Denitz Denitz - open - 10 Jul 2025
avatar Denitz Denitz - change - 10 Jul 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Jul 2025
Category Libraries
avatar Denitz Denitz - change - 10 Jul 2025
Title
Model\AfterCleanCacheEvent event class is not forced for onContentCleanCache events
[5.3] Model\AfterCleanCacheEvent event class is not forced for onContentCleanCache events
avatar Denitz Denitz - edited - 10 Jul 2025
avatar Denitz
Denitz - comment - 21 Aug 2025

@Fedik Should I rebase it to 5.4, or 6.0?

avatar Fedik
Fedik - comment - 21 Aug 2025

Please rebase to 5.4

avatar Denitz Denitz - change - 21 Aug 2025
Title
[5.3] Model\AfterCleanCacheEvent event class is not forced for onContentCleanCache events
[5.4] Model\AfterCleanCacheEvent event class is not forced for onContentCleanCache events
avatar Denitz Denitz - edited - 21 Aug 2025
avatar Denitz
Denitz - comment - 21 Aug 2025

Done.

avatar richard67 richard67 - change - 21 Aug 2025
Labels Added: bug PR-5.4-dev
avatar Fedik Fedik - test_item - 22 Aug 2025 - Tested successfully
avatar Fedik
Fedik - comment - 22 Aug 2025

I have tested this item ✅ successfully on 8883ae8


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

avatar richard67 richard67 - test_item - 22 Aug 2025 - Tested successfully
avatar richard67
richard67 - comment - 22 Aug 2025

I have tested this item ✅ successfully on 8883ae8

Tested by code review.


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

avatar richard67 richard67 - change - 22 Aug 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 22 Aug 2025

RTC


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

avatar richard67
richard67 - comment - 22 Aug 2025

I don't think it needs real tests which require some coding as it is a no-brainer.

avatar richard67 richard67 - change - 22 Aug 2025
Labels Added: RTC
avatar muhme muhme - change - 23 Aug 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-08-23 05:43:20
Closed_By muhme
avatar muhme muhme - close - 23 Aug 2025
avatar muhme muhme - merge - 23 Aug 2025
avatar muhme
muhme - comment - 23 Aug 2025

Thank you @Denitz for your contribution. Thank you @Fedik and @richard67 for testing.

Add a Comment

Login with GitHub to post a comment