No Code Attached Yet Webservices
avatar aberenguer78
aberenguer78
13 Dec 2023

Steps to reproduce the issue

I have a problem using the Joomla 4 API.
I'm trying to retrieve the data of a single category or a single tag by the alias because I don't know the id.
The api urls I'm using I have tried both cases filter search that searches title, alias and content text fields. The API url Calls:
{{base_url}}/{{base_path}}/content/categories?filter[search]=blog
And I have filtered by the specific field the alias:
{{base_url}}/{{base_path}}/content/categories?filter[alas]=blog
When I see the results that api returns I can see all the categories I have in joomla but not the one I'm searching.
The same thing happens to me with the tags
{{base_url}}/{{base_path}}/tags?filter[search]=provatag3
{{base_url}}/{{base_path}}/tags?filter[alias]=provatag3
Both queries return all the tags I have in joomla.
I know there's no documentation in the joomla api documentation about filtering but I think it should work. At least searching by alias the articles seems to work.

Expected result

The category or tag with the text or alias searched is shown in the result of the API call.

Actual result

In both cases are shown all the results existing in the joomla db. Categories or tags depending on the request.

System information (as much as possible)

Joomla 4.2.5
PHP 7.4.30
10.4.25-MariaDB
Apache/2.4.54 (Win64)

Additional comments

Inside the joomla api\components\com_content\src\Controller\ArticlesController.php exist the method displaylist that is filtering the search for articles, so for articles we can get the articles searched by text or alias. I think the same should be replicated to the TagsController and to the CategoriesController to have the same feature in the api with not much effort.

avatar aberenguer78 aberenguer78 - open - 13 Dec 2023
avatar aberenguer78 aberenguer78 - change - 13 Dec 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 13 Dec 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Dec 2023
avatar aberenguer78 aberenguer78 - change - 13 Dec 2023
The description was changed
avatar aberenguer78 aberenguer78 - edited - 13 Dec 2023
avatar alikon alikon - change - 14 Dec 2023
Labels Added: Webservices
avatar alikon alikon - labeled - 14 Dec 2023
avatar alikon alikon - close - 14 Dec 2023
avatar alikon
alikon - comment - 14 Dec 2023

please test #42519

avatar alikon alikon - change - 14 Dec 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-12-14 14:29:17
Closed_By alikon

Add a Comment

Login with GitHub to post a comment