I have installed com api and users plugin from Techjoomla. I try to connect:
MyDomain/index.php?option=com_api&app=users&format=raw&resource=loginkey=MyKey
But browser respond: could not get any respond Request log is empty. Apache2 log: http://prntscr.com/bq1ytu Error after switching on Debug: Fatal error: Cannot redeclare class JDispatcher in mydomain\libraries\joomla\event\dispatcher.php on line 281 Please help me to connect correctly.
And when I change the com_api/libraries/plugin.php:58
//$dispatcher = JEventDispatcher::getInstance();
$dispatcher = JDispatcher::getInstance();
I see response in browser:
{"code":400,"message":"Users API Plugin not found, Users is probably not installed"}
How to fix it?
Problem had been solved after upgrading to joomla 3
You must comment this line "self::$plg_path = self::$plg_path.$plugin->name.'/';"
.
if (version_compare(JVERSION, '3.0', 'ge'))
{
$dispatcher = JDispatcher::getInstance();
}
else
{
// $dispatcher = JEventDispatcher::getInstance();
$dispatcher = JDispatcher::getInstance();
// self::$plg_path = self::$plg_path.$plugin->name.'/';
}
It's works fine for me. ;) Testing under Joomla 2.5.13.