Skip to content

[5.3] Language override api issue - the webservices API for handling language overrides is not working #41016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: 5.3-dev
Choose a base branch
from

Conversation

MacJoom
Copy link
Contributor

@MacJoom MacJoom commented Jun 22, 2023

Pull Request for Issue # .
Using the API for changing langugage overrides does not work
See https://docs.joomla.org/J4.x:Joomla_Core_APIs - Section Overrides Languages

Summary of Changes

OverrideModel: Wrong determination of client (site or admin)
OverridesController: Edit function did not exist, Save function did not use correct language/client
APIController: Delete needs modelstate

Testing Instructions

Do your own API calls on Language Override Operations

or use my Postman collection https://github.com/MacJoom/j4x-api-collection Section 5.3

Update: Use the updated collection from Alexandre Elise:

https://github.com/alexandreelise/j4x-api-collection

Example calls:
POST:
http://newrelease6-0.test/joomla-cms/api/index.php/v1/languages/overrides/site/de-DE
raw Body: {"key":"JTESTIT","override":"text"}

replace http://newrelease6-0.test with your url

Result:
{
"links": {
"self": "http://newrelease6-0.test/joomla-cms/api/index.php/v1/languages/overrides/site/de-DE"
},
"data": {
"type": "overrides",
"id": "JTESTIT",
"attributes": {
"value": "text"
}
}
}
GET:
http://newrelease6-0.test/joomla-cms/api/index.php/v1/languages/overrides/site/de-DE
Result:
{
"links": {
"self": "http://newrelease6-0.test/joomla-cms/api/index.php/v1/languages/overrides/site/de-DE"
},
"data": [
{
"type": "overrides",
"id": "JTESTIT",
"attributes": {
"value": "text"
}
}
],
"meta": {
"total-pages": 1
}
GET: (language id)
http://newrelease6-0.test/joomla-cms/api/index.php/v1/languages/overrides/site/de-DE/JTESTIT
Result:
{
"links": {
"self": "http://newrelease6-0.test/joomla-cms/api/index.php/v1/languages/overrides/site/de-DE/JTESTIT"
},
"data": {
"type": "overrides",
"id": "JTESTIT",
"attributes": {
"value": "JTestit Entry"
}
}
}

PATCH:
http://newrelease6-0.test/joomla-cms/api/index.php/v1/languages/overrides/site/de-DE/JTESTIT
{"key":"JTESTIT","override":"new text 5"}
Result:
{
"links": {
"self": "http://newrelease6-0.test/joomla-cms/api/index.php/v1/languages/overrides/site/de-DE/JTESTIT"
},
"data": {
"type": "overrides",
"id": "JTESTIT",
"attributes": {
"value": "new text 5"
}
}
}

DELETE:
http://newrelease6-0.test/joomla-cms/api/index.php/v1/languages/overrides/site/de-DE/JTESTIT

Empty result: Status 204, Language Override is deleted

if you get Forbidden as result your Authorization is not set up correctly
use Auth Type: API Key
Key: X-Joomla-Token
Value: <copy from User Tab 'Joomla API Token'>

Actual result BEFORE applying this Pull Request

POST, PATCH and DEL requests fail

Expected result AFTER applying this Pull Request

All requests work

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • [ x] No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • [x ] No documentation changes for manual.joomla.org needed

@obuisard obuisard added the bug label Aug 14, 2023
@HLeithner HLeithner changed the base branch from 4.3-dev to 4.4-dev September 30, 2023 22:43
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 4.4-dev.

@HLeithner HLeithner changed the title Language override api issue - the webservices API for handling language overrides is not working [4.4] Language override api issue - the webservices API for handling language overrides is not working Apr 24, 2024
@HLeithner HLeithner changed the base branch from 4.4-dev to 5.2-dev November 15, 2024 13:21
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 5.2-dev.

@HLeithner HLeithner changed the title [4.4] Language override api issue - the webservices API for handling language overrides is not working [5.2] Language override api issue - the webservices API for handling language overrides is not working Nov 15, 2024
@rdeutz rdeutz removed the PR-4.4-dev label Feb 19, 2025
@HLeithner HLeithner changed the base branch from 5.2-dev to 5.3-dev April 15, 2025 16:16
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 5.3-dev.

@HLeithner HLeithner changed the title [5.2] Language override api issue - the webservices API for handling language overrides is not working [5.3] Language override api issue - the webservices API for handling language overrides is not working Apr 15, 2025
@exlemor
Copy link

exlemor commented Aug 23, 2025

I have tested this item 🔴 unsuccessfully on 74e668b

I was not able to test successfully (and Macjoom and Richard were watching during PBF 23.08) ;( Sorry @MacJoom


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

@MacJoom MacJoom marked this pull request as draft August 23, 2025 15:43
@MacJoom MacJoom marked this pull request as ready for review August 23, 2025 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.