Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: live627 on May 29th, 2013, 10:54 AM

Title: action_list is called too late
Post by: live627 on May 29th, 2013, 10:54 AM
Call to the hook must be moved right below the keepalive check. Then plugins can add their own actions again!
Title: Re: action_list is called too late
Post by: Nao on May 29th, 2013, 11:10 AM
Hmm, I'll let Pete deal with this one, cuz I'm not sure about it all... ;)
Title: Re: action_list is called too late
Post by: Arantor on May 29th, 2013, 04:17 PM
Give me a use case for plugins that have to declare their own actions manually...

I probably will fix it anyway but folks should be using the XML interface which is faster since no extra files get loaded.
Posted: May 29th, 2013, 02:49 PM

Have fixed locally, will commit later. There is a small contingent of cases you might need it (e.g. certain kinds of CMS if we don't get to that first...) but it does need to be set up for $context['action']'s benefit.
Title: Re: action_list is called too late
Post by: Nao on May 30th, 2013, 09:22 AM
Given the new position, is it really useful at all..?
One could always use the 'behavior' hook, and simply reset $context['action'] and $context['subaction'] as needed... No..?
Title: Re: action_list is called too late
Post by: live627 on May 30th, 2013, 09:39 AM
I'm not so sure that'll work...

The action loader doesn't use those, it uses $action_list because that's where all the action data is stored.

The behavior hook could do without the extra param, as it's a copy of $context['action'].