Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load menus before triggering before and after delete events #5458

Merged
merged 1 commit into from
Feb 10, 2015

Conversation

amazeika
Copy link
Contributor

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.

@zero-24
Copy link
Contributor

zero-24 commented Feb 8, 2015

@test successful Thanks for the patch @amazeika


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

@amazeika
Copy link
Contributor Author

amazeika commented Feb 9, 2015

@zero-24 Thank you for testing :).

@roland-d
Copy link
Contributor

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

@roland-d roland-d added this to the Joomla! 3.4.0 milestone Feb 10, 2015
roland-d added a commit that referenced this pull request Feb 10, 2015
Load menus before triggering before and after delete events
@roland-d roland-d merged commit 57d592b into joomla:staging Feb 10, 2015
@amazeika
Copy link
Contributor Author

@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!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants