? ? Success

User tests: Successful: Unsuccessful:

avatar yireo
yireo
4 Oct 2014

The frustration of many developers is that the Menu Item models and Menu models are outdated and lack the flexibility of events. This commit adds the onContentBeforeSave() and onContentAfterSave() calls to Menu Item, reusing code from the JModelAdmin (even though that class lives in the legacy folder).

avatar yireo yireo - open - 4 Oct 2014
avatar jissues-bot jissues-bot - change - 4 Oct 2014
Labels Added: ?
avatar brianteeman brianteeman - change - 4 Oct 2014
Category Administration Plugins
avatar rvbgnu
rvbgnu - comment - 4 Oct 2014

Thanks @yireo to add that feature. Please could you provide test instructions? Maybe a plugin to trigger these two events.

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

avatar yireo
yireo - comment - 5 Oct 2014

Thanks for the pointer. I've now created a custom repository, with a test plugin that logs to the Joomla logs folder when this patch is used in Joomla. It allows for testing this properly. Test instructions are available in that repository as well: https://github.com/yireo/plg_content_menuitemstest

avatar rmcdaniel
rmcdaniel - comment - 13 Oct 2014

Test works. Nice addition which has been requested for quite a while!

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

avatar rmcdaniel
rmcdaniel - comment - 13 Oct 2014

By the way, you should make this support onContentChangeState too.

avatar yireo
yireo - comment - 14 Oct 2014

Thanks for the test. As for the suggestion on implementing onContentChangeState as well - that was my idea as well. But let's take this step by step. There are many more events to implement :)

avatar Bakual
Bakual - comment - 14 Oct 2014

Can you please have a look at #4308. It should fix this issue as well and in a more generic way. It would be great if we can get some tests there.

avatar yireo
yireo - comment - 14 Oct 2014

Thanks for noticing. Will do.

avatar infograf768 infograf768 - change - 14 Oct 2014
Labels Added: ?
avatar yireo
yireo - comment - 8 Nov 2014

I've tested the other patch and it is solid. I will close this PR because the functionality is also available in the other PR.

avatar yireo yireo - close - 8 Nov 2014
avatar yireo yireo - change - 8 Nov 2014
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-11-08 03:39:52

Add a Comment

Login with GitHub to post a comment