User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Call sendHeaders after headers are set.
And set status code with application instead of using http_response_code.
Content type is incorrect text/html.

Content type is correct application/json, and other headers are also set.

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
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_media |
| Title |
|
||||||
| Labels |
Added:
bug
PR-5.3-dev
|
||
This pull request has been automatically rebased to 5.4-dev.
| Title |
|
||||||
| Labels |
Added:
PR-5.4-dev
Removed: PR-5.3-dev |
||
I have tested this item ✅ successfully on b574cc1
Tested with JBT, before the PR, Checked com_media URLs with &format=json have Response Header Content-Type: text/html but response is JSON, e.g.
Applied PR with Patch Tester
com_media URLs with &format=json and Response Header is Content-Type: application/json| Status | Pending | ⇒ | Ready to Commit |
RTC
| Labels |
Added:
RTC
|
||
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-11-08 11:22:44 |
| Closed_By | ⇒ | richard67 |
I have tested this item ✅ successfully on e49301b
It took me a while to figure out exactly what to do: my browser URL
Without the patch I could see Content Type: text/html and the visible response was just text but obviously json. With the patch the response was application/json and the browser nicely formatted the json for me.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45150.