J3 Issue ?
avatar LivioCavallo
LivioCavallo
24 Aug 2017

Steps to reproduce the issue

In J!3.7.5 one can save a Create Article menu item, settting "Default Category" to Yes and NOT filling the "Choose a Category" field.

Expected result

Joomla! refuses to save menu item.

Actual result

Joomla! saves the menu item.
In frontend, using that menu with such a setting, forces to save the article in a newly created category with name '1' !

System information (as much as possible)

J!3.7.5 (and probably all previous versions)

Additional comments

Bug detected thanks by @infograf768 while testing PR #17674 .

We need a way to make 'catid' (Choose a Category) form field param required (\components\com_content\views\form\tmpl\edit.xml) when enable_category param (Default/Specific category) is active.
A new "requiredon:..." attribute, working like "showon:..." ?
A way to require validation of that attribute in the backend from ?

avatar LivioCavallo LivioCavallo - open - 24 Aug 2017
avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Aug 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Aug 2017
Category com_content com_menus
avatar ggppdk
ggppdk - comment - 25 Aug 2017

Regardless of the parameter being required

proper behaviour would be that
setting "Default category" to Yes and not selecting a category

  • should behave like "Default category" is OFF,

i mean code (when possible) should anticipate bad configuration
and work in a proper way, regardless of user input

avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Aug 2017
Status New Discussion
avatar LivioCavallo
LivioCavallo - comment - 25 Aug 2017

I agree with your suggested behaviour (it's now merged in #17674).
Anyway I think that the "Selected category" should be 'required' if Default category is ON and the user should be blocked on saving or at least receive an alert saying that without selecting a category there won't be any constraints on the category, as if 'enable_category' is OFF.

avatar infograf768
infograf768 - comment - 25 Aug 2017

A new "requiredon:..." attribute, working like "showon:..." ?

I like this idea.

avatar infograf768
infograf768 - comment - 25 Aug 2017

btw, the issue is in any J version, including staging.

avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar alikon
alikon - comment - 5 Jul 2019

@infograf768 is this still an issue ?

avatar infograf768
infograf768 - comment - 5 Jul 2019

yes

avatar infograf768
infograf768 - comment - 5 Jul 2019

let me have a look at this a bit. I think that we could set the field as required when Default Category is set to Yes

avatar infograf768
infograf768 - comment - 5 Jul 2019

hmm, not so simple...

avatar infograf768
infograf768 - comment - 9 Aug 2019

Closing as we have a patch.
Please test #25798

avatar infograf768 infograf768 - change - 9 Aug 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-08-09 07:48:15
Closed_By infograf768
avatar infograf768 infograf768 - close - 9 Aug 2019

Add a Comment

Login with GitHub to post a comment