Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#46664 closed defect (bug) (wontfix)

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

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

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 8 years ago.
46664.diff​ (1.7 KB ) - added by xkon 8 years ago.

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
8 years ago

  • Component General → Administration
  • Milestone Awaiting Review → 5.2

#2 @pento
8 years ago

  • Type enhancement → defect (bug)

#3 in reply to: ↑ description @SergeyBiryukov
8 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
8 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
8 years ago

  • Milestone 5.2
  • Resolution → wontfix
  • Status new → closed

I tend to agree with comment:4.

#6 @spacedmonkey
7 years ago

  • Component Administration → Site Health

#7 @SergeyBiryukov
7 years ago

#50016 was marked as a duplicate.

Note: See TracTickets for help on using tickets.