akeeba / engage

Akeeba Engage - Comments for Joomla!™ articles made easy
GNU General Public License v3.0
16 stars 10 forks source link

The Actionlog plugin throws an Exception on admin actions #167

Closed nikosdion closed 2 years ago

nikosdion commented 2 years ago

When an admin deletes, unpublishes or publishes a comment we get an exception.

The events for onComEngageCommentsControllerAfterDelete, onComEngageCommentsControllerAfterPublish, onComEngageCommentsControllerAfterUnpublish pass a BaseController object, not a table.

Publish and unpublish call onContentChangeState. Use that instead of onComEngageCommentsControllerAfterPublish, onComEngageCommentsControllerAfterUnpublish. It gets a context, the PKs array and the value (0/1 for unpublish/publish).

Delete calls onContentAfterDelete. Use that instead of onComEngageCommentsControllerAfterDelete. It get a context and a table.

NetSecond commented 2 years ago

Same as mark as spam and delete:

Akeeba Engage - An unhandled Exception has been detected
500 Akeeba\Component\Engage\Administrator\Table\CommentTable::onAfterDelete(): Argument #2 ($pk) must be of type int, null given
File <root>/administrator/components/com_engage/src/Table/CommentTable.php Line 110

Edit: After that, the comment is deleted.

nikosdion commented 2 years ago

That's a very, very different issue.

NetSecond commented 2 years ago

Ok ....

nikosdion commented 2 years ago

Original issue closed with 9c2ca8e9