#46312 closed defect (bug) (fixed)
Replace http with https in custom links menu item
Reported by: | aksl95 | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | has-screenshots has-patch |
Focuses: | Cc: |
Description
On the URL input of custom links menu item, replace the value http with https.
Attachments (9)
Change History (44)
#3
@
6 years ago
- Keywords has-screenshots added
- Milestone changed from Awaiting Review to 5.2
- Status changed from reviewing to accepted
Wondering is we should also fix customizer placeholder/value in this patch or open a new one.
Maybe we should also use placeholder
attribute instead of value
.
#4
@
6 years ago
- Keywords needs-refresh added
Hi @mukesh27 thanks for the update :)
Changing value
to placeholder
attribute is nice, but I don't think we should check is_ssl()
since Custom links can handle external links as well. We should let https by default in my opinion (as a placeholder) ;-)
#5
@
6 years ago
@audrasjb, Using is_ssl() we can know if user use SSL or not. if we added https then all custom links goes to it's https page but without SSL website will show https error or move that link using 301 redirection.
#6
@
6 years ago
@mukesh27 if it’s a placeholder (which is fine), we don't care so much if the website uses https or not: we are only giving an indication with this placeholder so the user can do whatever they want (http/https) :-)
#9
follow-up:
↓ 11
@
6 years ago
Worth considering while in Gutenberg https://
is a placeholder, in the menus it's actually part of the input value.
What happens if users just complete the existing https://
with the rest of the URL and the linked website is still on http://
?
#11
in reply to:
↑ 9
@
6 years ago
Replying to afercia:
Worth considering while in Gutenberg
https://
is a placeholder, in the menus it's actually part of the input value.
What happens if users just complete the existing
https://
with the rest of the URL and the linked website is still onhttp://
?
This is part the purpose of https://core.trac.wordpress.org/attachment/ticket/46312/46312.2.diff:
- replace
http://
withhttps://
- use
placeholder
attribute instead ofvalue
This ticket was mentioned in Slack in #core by aksl95. View the logs.
6 years ago
#14
@
6 years ago
- Keywords needs-patch added; has-patch commit removed
The (original) design intent of this "placeholder" is actually to be a part of a value as opposed to a true placeholder. It's provided as a staring point for users that type in a URL. Users pasting in a URL would need to manually remove this default value. I'd prefer keeping the current behavior unless research supports making a change. However, I support updating to https://
either way. I also recall some menu customizer JS that may be tied to the default value and that should be confirmed before making the change.
This needs to be updated both in the customizer and in the admin version of menus if a change is made, either way. It looks like we need a combination of 46312.2.diff and 46312-patch-https.diff once a decision is made on changing from a default value to a placeholder.
@
6 years ago
Adds https to both menus and customizer, replaces value withplaceholder and updates the custom link check
#15
@
6 years ago
Thanks for your comment @celloexpressions
I don't think value is a good idea since this attribute is supposed to specifiy a default value. Placeholders should be used to specify an example value.
By the way, I updated the patch.
In 46312.3.diff
:
- Add https to both menu and customizer screens
- Replace
value
withplaceholder
- Updates the custom link check to handle both
http://
,https://
and empty value… though it should be empty all the time now we don't have any default value anymore. But… worth it :)
@SergeyBiryukov if you have a chance, can you please check what I say in the item 3) above in the last patch 46312.3.diff
?
#17
@
6 years ago
- Keywords needs-refresh added
- Milestone changed from 5.2 to 5.3
Found some associated JS code referring to http://
in nav menus that should be updated as well:
js/_enqueues/lib/nav-menu.js
js/_enqueues/wp/customize/nav-menuslib/nav-menu.js
With 5.2 Beta 1 deadline approaching in a few hours, I'd rather test this carefully early in 5.3.
@
6 years ago
Edit placeholder in javascripts files (nav-menu & customizer). Update the custom link check (http & https).
#18
@
6 years ago
Thanks for you analysis @SergeyBiryukov.
In 46312.4.diff, I updated javascript files.
After submission, I reset the value and update the placeholder with https.
This ticket was mentioned in Slack in #core by aksl95. View the logs.
6 years ago
#21
follow-up:
↓ 22
@
6 years ago
I wonder if rather than defaulting to https, it might make sense to default to whatever protocol the site is set to use in home
.
#22
in reply to:
↑ 21
;
follow-up:
↓ 24
@
6 years ago
Replying to jorbin:
I wonder if rather than defaulting to https, it might make sense to default to whatever protocol the site is set to use in
home
.
For custom links, I don't know if it has a relationship because these links can be external.
#24
in reply to:
↑ 22
@
5 years ago
- Keywords commit added; needs-testing removed
Replying to aksl95:
Replying to jorbin:
I wonder if rather than defaulting to https, it might make sense to default to whatever protocol the site is set to use in
home
.
For custom links, I don't know if it has a relationship because these links can be external.
Agree. There is no relationship with the website protocol since custom links are used for both internal and external link.
Also, the patch is tested and still applies cleanly on my side. Adding commit
keyword.
#25
@
5 years ago
For information, the other related "https placeholders" ticket was committed this week: #46320
#26
@
5 years ago
- Keywords needs-refresh added; commit removed
The patch doesn't applies cleanly anymore.
#27
@
5 years ago
- Keywords commit added; needs-refresh removed
Patch refreshed in 46312.5.diff
.
Would be great to get a commit action since enhancements should be committed before beta 1 and as this tickets goes with #46320 which is already committed to 5.3.
@SergeyBiryukov if you have a chance… :-)
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
5 years ago
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
5 years ago
#30
@
5 years ago
- Type changed from enhancement to defect (bug)
Moving to bugs list to see if it can land along with #46320.
Hi @aksl95 and welcome to WordPress Trac
That seems relevant to me.
The existing placeholder can make think that the user must use http. We should encourage the use of https.
Also, the block editor uses https for its placeholders. Let's add some consistency :)
Auto assigning for review.