?
avatar jschmi01
jschmi01
2 Feb 2015

For plugin there should be a similar checking done for plugin as for module.
I used this sample code in ajax.php:

..
elseif ($input->get('plugin'))
{
    $plugin = $input->get('plugin');
    if (JPluginHelper::importPlugin('ajax', $plugin))
    {
        $dispatcher = JEventDispatcher::getInstance();
        $plugin = ucfirst($plugin);
        
        try
        {
            $results = $dispatcher->trigger('onAjax' . $plugin);
        }
        catch (Exception $e)
        {
            $results = $e;
        }
    }
    else
        $results = new LogicException(JText::sprintf('COM_AJAX_PLUGIN_NOT_ACCESSIBLE', $plugin), 404);
}
...

Additional comments

avatar jschmi01 jschmi01 - open - 2 Feb 2015
avatar jschmi01 jschmi01 - change - 2 Feb 2015
The description was changed
avatar jschmi01 jschmi01 - change - 2 Feb 2015
The description was changed
avatar Bakual
Bakual - comment - 2 Feb 2015

I'm not sure what you mean. com_ajax supports also plugins. The only restriction so far is that they have to be in the specific ajax plugin group.
This restriction will be removed with 3.4.0.
For more details see #3938

If that is not what you meant, please be more descriptive and if possible create a PR (since you already seem to have some code)

avatar wilsonge
wilsonge - comment - 3 Feb 2015

He's saying that we should throw a logic exception if no plugin exists with the given name comparing the sample code to the code in 3.3.6

avatar jschmi01
jschmi01 - comment - 3 Feb 2015

yes! That was what I meant.

This restriction will be removed with 3.4.0.
For more details see #3938

Will then naming schemes for plugins, which are quite special to com_ajax be changed as well?

avatar wilsonge
wilsonge - comment - 3 Feb 2015

The event will still start with onAjax

avatar jschmi01
jschmi01 - comment - 3 Feb 2015

Ok - thanks! tested my system-plugin with using &group=system - works perfectly

avatar zero-24 zero-24 - change - 3 Feb 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-02-03 20:48:11
Closed_By zero-24
avatar jissues-bot jissues-bot - change - 3 Feb 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-02-03 20:48:12
avatar jissues-bot jissues-bot - close - 3 Feb 2015
avatar zero-24
zero-24 - comment - 3 Feb 2015

Thanks for the update @jschmi01 so I'm closing here. Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5951.
avatar jissues-bot
jissues-bot - comment - 3 Feb 2015

Set to "closed" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/5951

avatar zero-24 zero-24 - close - 3 Feb 2015
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment