Fixed In-line mod action are NOT listed when added using inline_mod_actions code event listener

TickTackk

Well-known member
Affected version
2.*
^ title because inline_mod_actions is already fired under __construct method and then getPossibleActions is just getting the possible actions and not the entire actions which was altered using inline_mod_actions.

File: src\XF\InlineMod\AbstractHandler.php

Find:
PHP:
    /**
     * @return AbstractAction[]
     */
    abstract public function getPossibleActions();

Add before:
PHP:
    /**
     * @return AbstractAction[]
     */
    public function getActions()
    {
        return $this->actions;
    }


File: src\XF\Pub\Controller\InlineMod.php

Find:
PHP:
$actions = $handler->getPossibleActions();

Replace with:
PHP:
$actions = $handler->getActions();

And everything works as it should be!
 
Last edited:
Top Bottom