? ? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
2 Jan 2022

Summary of Changes

If there is a required custom field for a specific category, then API requests do fail when articles want to be created in other categories. It reports that the field is missing even the field is only required for articles in other categories.

Testing Instructions

  • Create a second category in articles manager
  • Create a custom field with "Required" to yes and assign it to "Uncategorised", NOT the new one!!
  • Run the following curl command (catid 2 is mostly Uncategorised in a defaul Joomla installation, replace when it is different on yours):
curl --location --request POST 'https://[your J4 website]/api/index.php/v1/content/articles' \
--header 'Content-Type: application/json' \
--header 'X-Joomla-Token: [your user token]' \
--data-raw '{"title":"Test","catid":2,"introtext":"","language":"*"}'

Actual result BEFORE applying this Pull Request

Error that the required field is missing.

Expected result AFTER applying this Pull Request

Article is created in the new category with the title test.

avatar laoneo laoneo - open - 2 Jan 2022
avatar laoneo laoneo - change - 2 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jan 2022
Category Libraries
avatar laoneo laoneo - change - 2 Jan 2022
The description was changed
avatar laoneo laoneo - edited - 2 Jan 2022
avatar laoneo laoneo - change - 2 Jan 2022
The description was changed
avatar laoneo laoneo - edited - 2 Jan 2022
avatar laoneo laoneo - change - 3 Jan 2022
Labels Added: ? ?
avatar alikon
alikon - comment - 3 Jan 2022

I have tested this item successfully on 83a962b


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

avatar alikon alikon - test_item - 3 Jan 2022 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 4 Jan 2022

I have tested this item successfully on 83a962b


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

avatar dgrammatiko dgrammatiko - test_item - 4 Jan 2022 - Tested successfully
avatar Quy Quy - change - 4 Jan 2022
Status Pending Ready to Commit
avatar Quy
Quy - comment - 4 Jan 2022

RTC


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

avatar laoneo laoneo - change - 7 Jan 2022
Labels Added: ?
avatar bembelimen bembelimen - change - 25 Jan 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-01-25 00:44:01
Closed_By bembelimen
avatar bembelimen bembelimen - close - 25 Jan 2022
avatar bembelimen bembelimen - merge - 25 Jan 2022
avatar bembelimen
bembelimen - comment - 25 Jan 2022

Thx

Add a Comment

Login with GitHub to post a comment