? ? ? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
7 Feb 2020

Summary of Changes

Category field is required in content item forms but it's possible to save content items without a valid category when creating category on the fly fails. This changes that.

Testing Instructions

Create a category. Call it whatever but set its alias as duplicate.
Create or edit an article/contact/newsfeed/banner.
In the category field enter Duplicate to create category on the fly.
Save.

Expected result

Saving fails with error:

Save failed with the following error: Another category with the same parent category has the same alias (remember it may be a trashed item).

Actual result

Article is either saved or we get this:

Argument 1 passed to Joomla\Component\Content\Administrator\Model\ArticleModel::getWorkflowByCategory() must be of the type integer, null given

Contact saving fails with error:

This category is invalid.

Newsfeeds and banners are saved.

Documentation Changes Required

IDK.

avatar SharkyKZ SharkyKZ - open - 7 Feb 2020
avatar SharkyKZ SharkyKZ - change - 7 Feb 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Feb 2020
Category Administration com_banners com_contact com_content com_newsfeeds Language & Strings Libraries
avatar SharkyKZ SharkyKZ - change - 7 Feb 2020
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 7 Feb 2020

Is this true in joomla 3 as well?

avatar SharkyKZ
SharkyKZ - comment - 7 Feb 2020

Yes. I did not make a PR for J3 because some may consider this B/C breaking change ?‍♂ .

avatar jwaisner jwaisner - test_item - 10 Feb 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 10 Feb 2020

I have tested this item successfully on e0322bf

Correct error is presented in articles, contacts, newsfeeds, and banners.


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

avatar brianteeman brianteeman - test_item - 12 Feb 2020 - Tested successfully
avatar brianteeman
brianteeman - comment - 12 Feb 2020

I have tested this item successfully on e0322bf

Confirmed the issue
Confirmed the fix by testing in com_content


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

avatar SharkyKZ SharkyKZ - change - 12 Feb 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 12 Feb 2020

RTC


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

avatar rdeutz
rdeutz - comment - 13 Feb 2020

@SharkyKZ

Yes. I did not make a PR for J3 because some may consider this B/C breaking change ?‍♂ .

This looks more like a bug so we can fix it for J3. What is with others components using categories, like banners, contact?

avatar SharkyKZ SharkyKZ - change - 13 Feb 2020
Labels Added: ?
avatar SharkyKZ
SharkyKZ - comment - 13 Feb 2020

Contact has a check in table class but other components allow saving without category.

avatar wilsonge
wilsonge - comment - 9 Mar 2020

Let's roll the check for a category in the Table level into j3 - no need to port the rest of it.

avatar wilsonge wilsonge - change - 9 Mar 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-03-09 11:56:04
Closed_By wilsonge
avatar wilsonge wilsonge - close - 9 Mar 2020
avatar wilsonge wilsonge - merge - 9 Mar 2020
avatar wilsonge
wilsonge - comment - 9 Mar 2020

Thanks!

Add a Comment

Login with GitHub to post a comment