POST https://[domain]/api/index.php/v1/content/articles
Headers:
X-Joomla-Token: <valid super-user token>
Content-Type: application/json
Accept: application/vnd.api+json
Body:
{
"alias": "my-article",
"articletext": "My text",
"catid": 24,
"language": "*",
"metadesc": "",
"metakey": "",
"title": "Here is an article"
}
6.1
New article created.
{
"errors": [
{
"title": "Field required: Title"
}
]
}
The API validator partially sees the body: when catid is also omitted, the error becomes:
{
"errors": [
{
"title": "Field required: Title\nField required: Category"
}
]
}
Removing catid adds a Category error, so the body is being parsed, but the title field always fails the required check even when a non-empty string is supplied.
Tested variations (all fail with the same Field required: Title error)
| Labels |
Added:
bug
|
||
| Labels |
Added:
No Code Attached Yet
|
||
The issue was caused by a published custom field under Content -> Fields that shared the same internal Name as a core article field. In my case, a custom field named title colliding with the core article title.
title./api/index.php/v1/content/articles with a valid body including "title": "...".{"errors":[{"title":"Field required: Title"}]} even though the title is present in the body.Fix: Unpublish or rename the colliding custom field.
The documentation for Custom Fields does not warn users against using names that match core field names. In J5.x:Adding custom fields/Parameters for all Custom Fields, the "Name must be unique" guidance refers to uniqueness among custom fields, not relative to core fields.
It would help to add a note listing reserved/core field names for each context (title, alias, catid, state, language, etc.).
| Labels |
Added:
Webservices
|
||
i'm unable to reproduce