User tests: Successful: Unsuccessful:
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.
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.
See invalid param type error, $event is instance of Event class.
No errors, the $event is instance of Model\AfterCleanCacheEvent.
Please select:
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
| Title |
|
||||||
Please rebase to 5.4
| Title |
|
||||||
Done.
| Labels |
Added:
bug
PR-5.4-dev
|
||
I have tested this item ✅ successfully on 8883ae8
I have tested this item ✅ successfully on 8883ae8
Tested by code review.
| Status | Pending | ⇒ | Ready to Commit |
RTC
I don't think it needs real tests which require some coding as it is a no-brainer.
| Labels |
Added:
RTC
|
||
| 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 |
Thank you @Denitz for your contribution. Thank you @Fedik and @richard67 for testing.
@Fedik Should I rebase it to 5.4, or 6.0?