Install the attached simple extension: alias_test.zip
Create a new article from admin panel:
The body contains 0 as intemid
Update the article:
Now the body contains the real ID
Create the article from API Post:
the itemid is empty (instead 0)
the API call also must have an ID with 0 on new item.
I do not test yet the update via API.
no value in the $item->id
Bug find in Joomla 4.4
it is important because some plugins use this check:
Labels |
Added:
No Code Attached Yet
|
Title |
|
Labels |
Added:
bug
|
To rephrase the issue: When creating an article via the browser, the default value for the ID of an article is 0. When doing the same via the API, no value is set, resulting in a null value being used in this place.
NOTE
the code:
is used onContentAFTERsave and not in onContentBEFORESave
The different behavior remains, but in case of BEFORE Save the correct control is:
if (!is_array($data) || empty($data['com_fields']))