RTC Unit/System Tests PBF bug Webservices PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
7 Aug 2025

Pull Request for Issue #45590 .

Summary of Changes

return HTTP status code 409 instead of 500
add a system test

Testing Instructions

delete not-trashed resource like: tag, category, article etc via webservices DELETE endpoint

Actual result BEFORE applying this Pull Request

HTTP status code 500 and error message "Internal server error".

Expected result AFTER applying this Pull Request

HTTP status code 409 with informative message like : Resource not in state that can be deleted, must be trashed before it can be deleted

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar alikon alikon - open - 7 Aug 2025
avatar alikon alikon - change - 7 Aug 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Aug 2025
Category JavaScript Unit Tests
avatar alikon alikon - change - 7 Aug 2025
Labels Added: Unit/System Tests PR-6.0-dev
avatar joomla-cms-bot joomla-cms-bot - change - 7 Aug 2025
Category JavaScript Unit Tests Libraries JavaScript Unit Tests
avatar alikon alikon - change - 7 Aug 2025
Title
Draft cannot delete not trashed banner test
[WIP][webservices] cannot delete not trashed resource return 409
avatar alikon alikon - edited - 7 Aug 2025
avatar alikon alikon - change - 7 Aug 2025
The description was changed
avatar alikon alikon - edited - 7 Aug 2025
03dfd25 7 Aug 2025 avatar alikon cs
2e72e0d 7 Aug 2025 avatar alikon cs
c74de06 7 Aug 2025 avatar alikon cs
5c2467d 7 Aug 2025 avatar alikon cs
avatar alikon alikon - change - 7 Aug 2025
Title
[WIP][webservices] cannot delete not trashed resource return 409
[WIP][webservices] cannot not trashed resource return 409
avatar alikon alikon - edited - 7 Aug 2025
avatar alikon alikon - change - 7 Aug 2025
Title
[WIP][webservices] cannot not trashed resource return 409
[WIP][webservices] cannot delete not trashed resource return 409
avatar alikon alikon - edited - 7 Aug 2025
avatar alikon alikon - change - 8 Aug 2025
The description was changed
avatar alikon alikon - edited - 8 Aug 2025
avatar alikon alikon - change - 8 Aug 2025
Title
[WIP][webservices] cannot delete not trashed resource return 409
[6.0][webservices] cannot delete not trashed resource return 409
avatar alikon alikon - edited - 8 Aug 2025
avatar exlemor exlemor - test_item - 8 Aug 2025 - Tested successfully
avatar exlemor
exlemor - comment - 8 Aug 2025

I have tested this item ✅ successfully on 9b475e6

I have tested this successfully via Postman! Thanks @alikon (and I confirmed that if you do Trash the article, if does DELETE it as well).


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45868.
avatar alikon alikon - change - 22 Aug 2025
Labels Added: PBF bug Webservices
avatar rbuelund rbuelund - test_item - 23 Aug 2025 - Tested successfully
avatar rbuelund
rbuelund - comment - 23 Aug 2025

I have tested this item ✅ successfully on 4fbb57e


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

avatar exlemor exlemor - test_item - 24 Aug 2025 - Tested successfully
avatar exlemor
exlemor - comment - 24 Aug 2025

I have tested this item ✅ successfully on 4fbb57e

I have re-tested this successfully ! Thanks @alikon

Same positive results :D


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

avatar richard67 richard67 - change - 25 Aug 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 25 Aug 2025

RTC


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

avatar richard67 richard67 - change - 30 Aug 2025
Labels Added: RTC
avatar richard67
richard67 - comment - 30 Aug 2025

I've allowed myself to fix the conflict in the ApiController.php file. It was caused by the same line of code being removed with this PR here and with PR #45589 on the 5.3-dev branch. As this did not change anything on the code, RTC is still valid.

avatar richard67
richard67 - comment - 30 Aug 2025

@alikon Since the last branch update, system tests are failing for this PR here:

  Running:  api/com_contact/Contacts.cy.js                                              (103 of 148)

  Test that contacts API endpoint
    ✓ can deliver a list of contacts (947ms)
    ✓ can deliver a single contact (97ms)
    ✓ can create a contact (120ms)
    ✓ can update a contact (158ms)
    ✓ can delete a contact (94ms)
    1) check correct response for delete a not existent contact
    ✓ can submit a contact form (291ms)

  6 passing (2s)
  1 failing

  1) Test that contacts API endpoint
       check correct response for delete a not existent contact:
     CypressError: `cy.request()` failed on:

https://localhost/cmysql/api/index.php/v1/contacts/9999
The response we received from your web server was:
  > 500: Internal Server Error

Did I do something wrong when resolving the conflict caused by the upmerged PR #45589 ?

avatar HLeithner HLeithner - change - 31 Aug 2025
Title
[6.0][webservices] cannot delete not trashed resource return 409
[6.0] [webservices] cannot delete not trashed resource return 409
avatar HLeithner HLeithner - edited - 31 Aug 2025
3d2add3 5 Sep 2025 avatar alikon cs
avatar alikon
alikon - comment - 7 Sep 2025

@richard67 all system tests are successful now

avatar Bodge-IT Bodge-IT - change - 8 Sep 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-09-08 19:10:03
Closed_By Bodge-IT
avatar Bodge-IT Bodge-IT - close - 8 Sep 2025
avatar Bodge-IT Bodge-IT - merge - 8 Sep 2025
avatar Bodge-IT
Bodge-IT - comment - 8 Sep 2025

Great work @alikon, thank you. Big thanks to @exlemor & @rbuelund for the tests

Add a Comment

Login with GitHub to post a comment