fix: Joomla 6 event type compatibility in content plugin #207
Reference in New Issue
Block a user
Delete Branch "fix/joomla6-event-handlers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
onContentAfterSave()andonContentChangeState()in the content pluginModel\AfterSaveEvent/Model\ContentChangeStateEventinstead ofContent\AfterSaveEvent/Content\ContentChangeStateEvent$eventparameters accept both Joomla 5 and 6 event objects (same pattern as the webservices plugin)Fixes fatal error:
Argument #1 ($event) must be of type AfterSaveEvent, Joomla\CMS\Event\Model\AfterSaveEvent givenTest plan