× Requests and support related to jBackend.

Unpublished items are also in the JSON with tag-based call

  • edthenet
  • edthenet's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 4 days ago #6448 by edthenet
When i call the API to get content based on TAGS i get all the articles based on the tag-id.
This seems to work oke, but i also see the articles that are not published.
Since there is not "state" indicated i can't filter them out myself in my app.

Could someone tell me how to add the state field into the result? or fix the plugin. Please

Please Log in or Create an account to join the conversation.

  • edthenet
  • edthenet's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 4 days ago #6449 by edthenet
I found that a could add the following code after line 850 of content.php file of the plugin
$item['state'] = $article->state;

This solves the part that i get the state in the JSON

Now if someone can add it in the next release and maybe make it an optional paramater for the API call, please

Please Log in or Create an account to join the conversation.

More
7 years 2 days ago #6451 by admin
Well the unpublished articles should not be sent at all, so the correct solution to the problem would be to NOT select the unpublished articles at all (this is a frontend plugin, btw).

So in the next release I will change the query according to this. Thanks for reporting the issue.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

Time to create page: 0.144 seconds