com_api-plugins icon indicating copy to clipboard operation
com_api-plugins copied to clipboard

articles plugin not working

Open ghost opened this issue 8 years ago • 8 comments

whenever i browse to http://localhost/joomla/index.php?option=com_api&app=content&resource=articles&format=raw

i get the bellow error


Notice: Trying to get property of non-object in C:\xampp\htdocs\Joomla\components\com_api\libraries\plugin.php on line 59
{"code":400,"message":"Content API Plugin not found, Content is probably not installed"}

Where can i get the content api plugin from?

ghost avatar Sep 26 '16 10:09 ghost

update i have also tried

http://localhost/joomla/index.php?option=com_api&app=articles&resource=articles&key=41069cebee474c9e77bbe500ca44a3fc&format=raw&id=71

And get

{"code":404,"message":"Articles Resource not found in this API"}

The users plugin seems to work

http://localhost/joomla/index.php?option=com_api&app=users&resource=users&key=41069cebee474c9e77bbe500ca44a3fc&format=raw

[{"id":"12","name":"Super User","username":"admin","email":"xxxxxxxxxxxxxx","block":"0","sendEmail":"1","registerDate":"2016-09-22 09:11:39","lastvisitDate":"2016-09-26 12:28:58","activation":"0","params":"","lastResetTime":"0000-00-00 00:00:00","resetCount":"0","otpKey":"","otep":"","requireReset":"0","group_count":"1","group_names":"Super Users","note_count":0}]

ghost avatar Sep 26 '16 12:09 ghost

Hi,

By the looks of it you havent installed and/or enabled the articles plugin. You can find it here https://github.com/techjoomla/com_api-plugins/tree/master/articles

parthlawate avatar Sep 26 '16 14:09 parthlawate

@parthlawate thanks for getting back to me. I have definitely installed and enabled the articles the plugin image

Whenever i try and call it the below happens

image

ghost avatar Sep 27 '16 08:09 ghost

I see that the documentation was wrong. It was using app=content instead of app=articles

Note that while the app name has the plural, the resource name has singular. SO please try the URL as index.php?option=com_api&app=articles&resource=article&format=raw

Can you try and confirm if this works ?

coolbung avatar Oct 01 '16 06:10 coolbung

@coolbung I have tried changing the app to articles and the resource to article and it is s till not working i get the following response

{"code":404,"message":"Article Resource not found in this API"}

see below

image

Thanks in advance

ghost avatar Oct 04 '16 09:10 ghost

Hi, I can confirm what Stevie say. Same Problem...

jrichard2 avatar Nov 11 '16 21:11 jrichard2

The class name should be ArticlesApiResourceArticle and not ContentApiResourceArticles

SuperFra avatar Dec 22 '16 12:12 SuperFra

I have the same problem for joomla 3.6.5 and I try to fix the problem then it works fine. But I am not sure it is the standard solution.
The link below https://github.com/techjoomla/com_api/pull/38/files

kimisme9386 avatar Feb 27 '17 02:02 kimisme9386