Opened 23 months ago
Closed 23 months ago
#56840 closed defect (bug) (fixed)
The permalink format is "plain" by default
Reported by: | strategio | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | 6.1 |
Component: | Permalinks | Keywords: | has-patch has-unit-tests commit dev-reviewed |
Focuses: | Cc: |
Description (last modified by )
In the previous WP versions, the permalink format was set to "Day and name" by default.
Steps to reproduce
- Start from scratch
- Complete the WP install wizard
- Go to Settings > Permalinks
=> With WP 6.0.2, it's set to "Day and name"
=> With WP 6.1 RC1, it's set to "Plain"
Notes
It's not really causing issue to us, but we have an end-to-end test that assumes the permalinks are set to "Day and name" and it started failing as soon as we ran it with WP 6.1 RC1.
So this might be a hint that something is wrong in WP 6.1 RC1 (or maybe it's on purpose).
Attachments (2)
Change History (13)
#1
@
23 months ago
- Component changed from General to Permalinks
- Milestone changed from Awaiting Review to 6.1
- Version set to trunk
#4
in reply to:
↑ 2
@
23 months ago
Replying to sabernhardt:
The Permalink Settings page had several changes for the upcoming release, but I was able to get the same results without visiting that page. The default schema.php setting has been blank for years, so the installation process set "Day and Name" pretty permalinks somewhere else in earlier sites (and now that doesn't work).
Right, pretty permalinks are conditionally enabled in wp_install_maybe_enable_pretty_permalinks()
if the server supports that.
#5
@
23 months ago
- Summary changed from [WP 6.1 RC1] The permalink format is "plain" by default to The permalink format is "plain" by default
#6
follow-up:
↓ 7
@
23 months ago
wp_install_maybe_enable_pretty_permalinks()
looks for the `X-Pingback` header to determine whether a post is accessible at a "pretty" URL. In [54250], the logic for sending the X-Pingback
header was moved to WP::send_headers()
, but that logic relies on $wp_query
, which isn't globalized in send_headers()
(unlike in WP::handle_404()
, where the logic used to be). A global $wp_query
looks like it'd be enough to address the issue.
#7
in reply to:
↑ 6
@
23 months ago
- Keywords has-patch needs-unit-tests added
- Owner set to SergeyBiryukov
- Status changed from new to accepted
Replying to dlh:
In [54250], the logic for sending the
X-Pingback
header was moved toWP::send_headers()
, but that logic relies on$wp_query
, which isn't globalized insend_headers()
(unlike inWP::handle_404()
, where the logic used to be). Aglobal $wp_query
looks like it'd be enough to address the issue.
Great catch, thanks!
#8
@
23 months ago
- Keywords has-unit-tests commit dev-feedback added; needs-unit-tests removed
56840.2.diff includes a unit test.
The Permalink Settings page had several changes for the upcoming release, but I was able to get the same results without visiting that page. The default schema.php setting has been blank for years, so the installation process set "Day and Name" pretty permalinks somewhere else in earlier sites (and now that doesn't work).
Steps I took for 6.0.2 and 6.1-RC1:
6.0.2 URL:
http://localhost/wp60a/2022/10/17/hello-world/
6.1-RC1 URL:
http://localhost/wp61a/?p=1