Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#46664 closed defect (bug) (wontfix)

Site Health: mixed slash symbols on paths in Directories and Sizes output

Reported by: xkon's profile xkon Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Site Health Keywords: site-health has-patch 2nd-opinion
Focuses: ui Cc:

Description

While checking out the discussion and testing #46645 I noticed that I'm getting the common mix of \ / in paths on the Directories and Sizes in Info page.

The uploaded diff addresses that by adding a wp_normalize_path() on the values returned.

--

Maybe we should so the same with WordPress Constants as ABSPATH, WP_CONTENT_DIR etc will be shown with mixed slashes as well?

Attachments (2)

normalize_paths.jpg (94.9 KB) - added by xkon 6 years ago.
46664.diff (1.7 KB) - added by xkon 6 years ago.

Download all attachments as: .zip

Change History (9)

@xkon
6 years ago

@xkon
6 years ago

#1 @SergeyBiryukov
6 years ago

  • Component changed from General to Administration
  • Milestone changed from Awaiting Review to 5.2

#2 @pento
6 years ago

  • Type changed from enhancement to defect (bug)

#3 in reply to: ↑ description @SergeyBiryukov
6 years ago

  • Keywords 2nd-opinion added

Replying to xkon:

Maybe we should so the same with WordPress Constants as ABSPATH, WP_CONTENT_DIR etc will be shown with mixed slashes as well?

I've seen some issues similar to #29154 in plugins, where mixed slashes cause string replacements to fail, for example when removing ABSPATH from the full path. Mixed slashes are not pretty, but maybe for diagnostic purposes we should display those constants as is.

Normalizing the slashes only in "Directories and Sizes" box seems fine, but would make it inconsistent with "WordPress Constants"... I don't have a strong opinion here, would like to hear others' thoughts :)

#4 @Clorith
6 years ago

As this is for debugging purposes, I think we should avoid modifications of constant data and similar, this may prove valuable to someone who has problems with paths in a plugin for example, to be able to show the raw path, over one we've prettified and possibly "hidden" the root case in.

#5 @SergeyBiryukov
6 years ago

  • Milestone 5.2 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I tend to agree with comment:4.

#6 @spacedmonkey
5 years ago

  • Component changed from Administration to Site Health

#7 @SergeyBiryukov
5 years ago

#50016 was marked as a duplicate.

Note: See TracTickets for help on using tickets.