Create Article menu item: displays error if Category is not selected when Default Category is set#25798
Conversation
when Default Category is set
|
It's impossible as the field should be ignored when Default category is set to no and we do not have a specific "requiredon" (on the model of "showon" code).
Why not give this detail? It does not cost much and help user solve the issue. grrr |
|
I have tested this item ✅ successfully on 0a9638a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25798. |
|
I have tested this item ✅ successfully on 261fdbe This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25798. |
|
@franz-wohlkoenig Last change after your test was just a language change, so you can just set your test result again without retest, just review last change, and then RTC 😄 |
|
Don't worry about appveyor btw. |
|
I know. |
|
Status "Ready To Commit". |
|
Sorry to say but this solution is really hacky in my opinion that should be done in a plugin for example content->joomla in the on_before_save event. |
|
@HLeithner |
|
@HLeithner I would also not know. I have an idea what you mean but I'm not good enough in event based stff to do it either. And it has 2 good tests, one from me. And I would not call it "hacky", only maybe "old style but working". So for me it's pretty fine. P.S.: And it fixes an issue. |
|
@richard67 writing a hardcoded string into com_menu because a specific other component needs it is wrong. It's possible that we don't have another way but if we have the choice we should use it. Please but this in to plg_content_joomla + the language string. |
|
@HLeithner Is not my PR, is @infograf768 |
|
will test. No idea what happens btw in general when that plugin is disabled. |
5b67f44 to
961b9cd
Compare
|
@richard67 @HLeithner |
|
I have tested this item ✅ successfully on b04c352 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25798. |
|
@franz-wohlkoenig Could you test again? |
|
I have tested this item ✅ successfully on b04c352 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25798. |
|
Thanks for catching this error. |
Pull Request for Issue #17708
Summary of Changes
as title says
Testing Instructions
Create a new menu item of type "Create Article"
In the Options tab, set Default Category to Yes
Do NOT select a category in the field below which only displays by a showon.
Save menu item.
Before patch
The menu item is saved. No error is set.
Category id was wrongly set to 1, which wrong behaviour is now corrected in frontend, among other issues with permissions, with #17674
After patch
Preventing saving and displaying an error message
@alikon @LivioCavallo