? Success

User tests: Successful: Unsuccessful:

avatar amazeika
amazeika
17 Dec 2014

Problem

Menu objects aren't being loaded before triggering before and after delete events.

Consequences

With #4308 changes, we are now triggering events on Menu delete actions. If the object isn't loaded before triggering these events, the data being passed to the handlers is incomplete.

Test instructions

  • Download The Joomla Catcher package. This package may be found at https://github.com/nooku/joomla-catcher. Just download the whole repo as a zip. This zip is installable AS IS.
  • Install the package that you've just downloaded.
  • Enable the Events Catcher - Content plugin and make sure that the onContentBeforeDelete and onContentAfterDelete are selected in the plugin configuration. Also make sure that the "Show data" option is enabled.
  • Create a new menu (not a menu item, a menu).
  • Delete the menu.

At this point the catcher plugin will raise a message for each event that got triggered. Without the patch, the menu data that gets passed to the event handler is missing (only ID is available in the after delete event). With the patch included in this PR, all the menu data is made available to the handlers, i.e. id, menutype, title and description.

Thank you in advance for considering this PR.

avatar amazeika amazeika - open - 17 Dec 2014
avatar jissues-bot jissues-bot - change - 17 Dec 2014
Labels Added: ?
avatar brianteeman brianteeman - change - 19 Dec 2014
Category Components
avatar zero-24 zero-24 - test_item - 8 Feb 2015 - Tested successfully
avatar zero-24
zero-24 - comment - 8 Feb 2015

@test successful Thanks for the patch @amazeika


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5458.
avatar zero-24 zero-24 - change - 8 Feb 2015
Easy No Yes
avatar amazeika
amazeika - comment - 9 Feb 2015

@zero-24 Thank you for testing :).

avatar roland-d
roland-d - comment - 10 Feb 2015

@test This patch indeed adds the complete data when deleting a menu. Great work on the Catcher package. Ready to merge.

avatar roland-d roland-d - change - 10 Feb 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-02-10 21:03:58
avatar roland-d roland-d - close - 10 Feb 2015
avatar roland-d roland-d - reference | - 10 Feb 15
avatar roland-d roland-d - merge - 10 Feb 2015
avatar roland-d roland-d - close - 10 Feb 2015
avatar amazeika
amazeika - comment - 11 Feb 2015

@roland-d Thank you for taking the time to test :). The catcher plugin is indeed very helpful for testing events, otherwise testing this would take way longer ... that's why we took a bit of time to develop it :).

Thanks for the merge!.

Add a Comment

Login with GitHub to post a comment