Opened 3 years ago
Closed 3 years ago
#13703 closed defect (bug) (fixed)
Entering nothing adds a menu with name "Enter menu name here"
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Menus | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
You might have guessed the problem, "Enter menu name here" should leave the textbox (if present) on form submit in the new menu creation area. Also the error message "A name is required for this term" should be changed (when you just put a " " in that textbox).
Attachments (3)
Change History (17)
comment:1
follow-up:
↓ 6
GautamGupta
— 3 years ago
comment:2
GautamGupta
— 3 years ago
- Milestone changed from Unassigned to 3.0
comment:3
nacin
— 3 years ago
- Keywords needs-patch added
- Severity changed from minor to normal
In testing, I've created my share of "Enter menu name here" menus.
koopersmith
— 3 years ago
comment:4
koopersmith
— 3 years ago
- Keywords has-patch added; needs-patch removed
Patch provides validation and warnings for menu names in JS.
Note that in no-JS, on save menu, blank or whitespace-only names still trigger the "A name is required for this term" error and work in progress is lost.
comment:5
koopersmith
— 3 years ago
- Keywords needs-patch added
comment:6
in reply to:
↑ 1
;
follow-up:
↓ 7
zerowolf
— 3 years ago
Replying to GautamGupta:
Same goes for "Add to Menu" in Custom Links. Also an error message should pop if no link is provided (the user should get to know about the problem).
In the Pages & Categories, "Select All" should rename to "Deselect All" if all things have been selected, and vice versa. Also in Pages, search always returns no results even if you type the exact page name.
I would recommend making separate tickets for these
comment:7
in reply to:
↑ 6
;
follow-up:
↓ 8
nacin
— 3 years ago
Agreed on new tickets.
Feedback for "Add to Menu" it hasn't been brought up and we already are at the point where we are not blindly inserting "http://" links as menu items. Thus I see no reason for this to be done in 3.0.
It's different here -- In this case, without a patch, we're ending up with "Enter menu name here" menus.
Additionally, I see no reason for "Select All" to change its label. Again, it changing is minor to nearly useless UI, people realize what occurs, and if they don't, they are only losing their selection if *all* are already checked, and they can click it again.
koopersmith
— 3 years ago
comment:8
in reply to:
↑ 7
GautamGupta
— 3 years ago
Replying to nacin:
Feedback for "Add to Menu" it hasn't been brought up and we already are at the point where we are not blindly inserting "http://" links as menu items. Thus I see no reason for this to be done in 3.0.
I was saying about entering a URL and not entering a name (it takes up the textbox label name like the "Enter menu name here" one). Also, if you do not enter a URL (leave it as "http://"), then no error message comes nor the form submits - anyone of these needs to take place.
Additionally, I see no reason for "Select All" to change its label. Again, it changing is minor to nearly useless UI, people realize what occurs, and if they don't, they are only losing their selection if *all* are already checked, and they can click it again.
It would be better to also provide a Deselect Option for UI if you're providing a Select All option already - though it is not that necessary too.
There's already a ticket #13525, should I put these points in there or create a new ticket?
comment:10
nacin
— 3 years ago
- Keywords has-patch removed
Note that in no-JS, on save menu, blank or whitespace-only names still trigger the "A name is required for this term" error and work in progress is lost.
comment:11
ocean90
— 3 years ago
13703-better-menu-name-check.patch: I use trim() to remove the whitespaces and check then if it's not empty, if it's empty I use the old menu name. No work in progress is lost anymore.
comment:12
nacin
— 3 years ago
If the new menu term clashes with another term however, you'd still see problems. That is probably more likely (given some sites with various menus and hundreds of cats and tags) than removing the menu name and clicking save.
comment:13
ocean90
— 3 years ago
- Keywords has-patch added; needs-patch removed
comment:14
nacin
— 3 years ago
- Resolution set to fixed
- Status changed from new to closed
Same goes for "Add to Menu" in Custom Links. Also an error message should pop if no link is provided (the user should get to know about the problem).
In the Pages & Categories, "Select All" should rename to "Deselect All" if all things have been selected, and vice versa. Also in Pages, search always returns no results even if you type the exact page name.