Feature Unit/System Tests Webservices PR-6.1-dev Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
14 Feb 2026

Pull Request for Issue # .

Summary of Changes

add filter state to categories endpoints

Testing Instructions

GET {{base_path}}/api/index.php/v1/banners/categories?filter[state]=1

GET {{base_path}}/api/index.php/v1/banners/categories?filter[state]=0
GET {{base_path}}/api/index.php/v1/contacts/categories?filter[state]=1

GET {{base_path}}/api/index.php/v1/contacts/categories?filter[state]=0
GET {{base_path}}/api/index.php/v1/content/categories?filter[state]=1

GET {{base_path}}/api/index.php/v1/content/categories?filter[state]=0

Actual result BEFORE applying this Pull Request

N/A

Expected result AFTER applying this Pull Request

you can filter categories from state = published or unpublished

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar alikon alikon - open - 14 Feb 2026
avatar alikon alikon - change - 14 Feb 2026
Status New Pending
avatar alikon alikon - change - 14 Feb 2026
Labels Added: PR-6.1-dev
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2026
Category JavaScript Unit Tests
avatar alikon alikon - change - 14 Feb 2026
Labels Added: Unit/System Tests
avatar alikon alikon - change - 14 Feb 2026
Title
add filter state to categories endpoints
[6.1][webservices] add filter state to categories endpoints
avatar alikon alikon - edited - 14 Feb 2026
avatar alikon alikon - change - 14 Feb 2026
The description was changed
avatar alikon alikon - edited - 14 Feb 2026
avatar alikon alikon - change - 20 Feb 2026
Labels Added: Feature Webservices
avatar alikon
alikon - comment - 20 Feb 2026

@exlemor
before this pr filter[state] is simply ignored

with this pr filter[state] is taken in consideration, so you are doing something wrong on your side

system tests demonstrate that it works as intended

avatar exlemor exlemor - test_item - 21 Feb 2026 - Tested successfully
avatar exlemor
exlemor - comment - 21 Feb 2026

I have tested this item ✅ successfully on 7bab005

Hi @alikon, I think this time I was successful.

Did a complete reinstall of Joomla 6.1ß2, and WITHOUT the PR whether:
https://www.domain.com/_j61b2/api/index.php/v1/contacts/categories?filter[state]=0 or
https://www.domain.com/_j61b2/api/index.php/v1/contacts/categories?filter[state]=1

I got the same:

{
"links": {
"self": "https://www.domain.com/_j61b2/api/index.php/v1/contacts/categories?filter[state]=0"
},
"data": [
{
"type": "categories",
"id": "4",
"attributes": {
"id": 4,
"title": "Uncategorised",
"alias": "uncategorised",
"note": "",
"published": 1,
"access": 1,
"checked_out": null,
"checked_out_time": null,
"created_user_id": 241,
"parent_id": 1,
"level": 1,
"lft": 5,
"rgt": 6,
"language": "*",
"description": "",
"language_title": null,
"language_image": null,
"editor": null,
"access_level": "Public",
"author_name": "Emmanuel Lemor",
"count_trashed": 0,
"count_unpublished": 0,
"count_published": 0,
"count_archived": 0
}
}
],
"meta": {
"total-pages": 1
}
}

WITH the PR applied:

for CONTACTS:
https://www.domain.com/_j61b2/api/index.php/v1/contacts/categories?filter[state]=0, I get:
{
"links": {
"self": "https://www.domain.com/_j61b2/api/index.php/v1/contacts/categories?filter[state]=0"
},
"data": [],
"meta": {
"total-pages": 0
}
}

and with
https://www.domain.com/_j61b2/api/index.php/v1/contacts/categories?filter[state]=1, I get:
{
"links": {
"self": "https://www.domain.com/_j61b2/api/index.php/v1/contacts/categories?filter[state]=1"
},
"data": [
{
"type": "categories",
"id": "4",
"attributes": {
"id": 4,
"title": "Uncategorised",
"alias": "uncategorised",
"note": "",
"published": 1,
"access": 1,
"checked_out": null,
"checked_out_time": null,
"created_user_id": 241,
"parent_id": 1,
"level": 1,
"lft": 5,
"rgt": 6,
"language": "*",
"description": "",
"language_title": null,
"language_image": null,
"editor": null,
"access_level": "Public",
"author_name": "Emmanuel Lemor",
"count_trashed": 0,
"count_unpublished": 0,
"count_published": 0,
"count_archived": 0
}
}
],
"meta": {
"total-pages": 1
}
}

For BANNERS
https://www.domain.com/_j61b2/api/index.php/v1/banners/categories?filter[state]=0, I get:
{
"links": {
"self": "https://www.domain.com/_j61b2/api/index.php/v1/banners/categories?filter[state]=0"
},
"data": [],
"meta": {
"total-pages": 0
}
}

https://www.domain.com/_j61b2/api/index.php/v1/banners/categories?filter[state]=1, I get:
{
"links": {
"self": "https://www.domain.com/_j61b2/api/index.php/v1/banners/categories?filter[state]=1"
},
"data": [
{
"type": "categories",
"id": "3",
"attributes": {
"id": 3,
"title": "Uncategorised",
"alias": "uncategorised",
"note": "",
"published": 1,
"access": 1,
"checked_out": null,
"checked_out_time": null,
"created_user_id": 241,
"parent_id": 1,
"level": 1,
"lft": 3,
"rgt": 4,
"language": "*",
"description": "",
"language_title": null,
"language_image": null,
"editor": null,
"access_level": "Public",
"author_name": "Emmanuel Lemor",
"count_trashed": 0,
"count_unpublished": 0,
"count_published": 0,
"count_archived": 0
}
}
],
"meta": {
"total-pages": 1
}
}


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46887.

Add a Comment

Login with GitHub to post a comment