This topic was marked solved by Arantor, on May 30th, 2013, 03:57 AM

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
action_list is called too late
« 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!
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Nao

  • Dadman with a boy
  • Posts: 16,082

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: action_list is called too late
« Reply #2, 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.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: action_list is called too late
« Reply #3, 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..?

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: action_list is called too late
« Reply #4, 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'].