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.
Joomla! refuses to save menu item.
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' !
J!3.7.5 (and probably all previous versions)
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 ?
Labels |
Added:
?
|
Category | ⇒ | com_content com_menus |
Status | New | ⇒ | Discussion |
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.
A new "requiredon:..." attribute, working like "showon:..." ?
I like this idea.
btw, the issue is in any J version, including staging.
Labels |
Added:
J3 Issue
|
@infograf768 is this still an issue ?
yes
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
hmm, not so simple...
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-08-09 07:48:15 |
Closed_By | ⇒ | infograf768 |
Regardless of the parameter being required
proper behaviour would be that
setting "Default category" to Yes and not selecting a category
i mean code (when possible) should anticipate bad configuration
and work in a proper way, regardless of user input