Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#52743 closed defect (bug) (fixed)

Hardcoded SVG image URLs on WP 5.7 About screen.

Reported by: tobiasbg's profile TobiasBg Owned by: audrasjb's profile audrasjb
Milestone: 5.7.1 Priority: normal
Severity: normal Version: 5.7
Component: Help/About Keywords: has-patch
Focuses: multisite Cc:

Description

Whereas the WP 5.7 About screen, as usual, offloads JPGs and MP4s to the wp.org CDN, 3 SVG images (/wp-admin/images/about-badge.svg, /wp-admin/images/about-color-palette-vert.svg, /wp-admin/images/about-color-palette.svg) are embedded in the package.

However, these are loaded from hardcoded relative URLs (relative to wp-admin/about.php when going to example.org/wp-admin/about.php). Due to that, these images are not shown when accessing the About screen from the About screen in the Network Admin (i.e. via example.org/wp-admin/network/about.php.

The hardcoded URLs should probably be replaced by calls to network_admin_url() or similar.

Attachments (3)

Bildschirmfoto 2021-03-09 um 22.28.57.png (124.9 KB) - added by TobiasBg 3 years ago.
about-badge.svg does not exist at example.org/wp-admin/network/images/about-badge.svg.
52743.diff (1.1 KB) - added by audrasjb 3 years ago.
Replace hardcoded image with dynamic URLs using network_admin_url
52743.2.diff (2.5 KB) - added by ryelle 3 years ago.

Download all attachments as: .zip

Change History (11)

@TobiasBg
3 years ago

about-badge.svg does not exist at example.org/wp-admin/network/images/about-badge.svg.

#1 @johnbillion
3 years ago

  • Focuses multisite added

This ticket was mentioned in Slack in #core by sergey. View the logs.


3 years ago

@audrasjb
3 years ago

Replace hardcoded image with dynamic URLs using network_admin_url

#3 @audrasjb
3 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to audrasjb
  • Status changed from new to accepted

@ryelle
3 years ago

#4 follow-up: @ryelle
3 years ago

It looks like this should be admin_url, since network_admin_url still adds the /network/ path to the URL. 52743.2.diff also fixes the issue in the other About subpages.

Should this be committed to trunk & backported to 5.7, or just committed to the 5.7 branch?

#5 in reply to: ↑ 4 @audrasjb
3 years ago

Replying to ryelle:

It looks like this should be admin_url, since network_admin_url still adds the /network/ path to the URL

Ah yes indeed 🤭 Thanks for pointing this out!

Should this be committed to trunk & backported to 5.7, or just committed to the 5.7 branch?

I think it's fine to commit to trunk then backport as is would fix the issue in trunk (trunk will show the 5.7 about page until the new about page is committed :)

Last edited 3 years ago by audrasjb (previous) (diff)

#6 @ryelle
3 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 50523:

Help/About: Use absolute URLs for inline images on About pages.

This ensures the images are loaded correctly from both single site and network About pages.

Props TobiasBg, audrasjb.
Fixes #52743.

#7 @ryelle
3 years ago

In 50524:

Help/About: Use absolute URLs for inline images on About pages.

This ensures the images are loaded correctly from both single site and network About pages.

Props TobiasBg, audrasjb.
Merges [50523] to the 5.7 branch.
Fixes #52743.

#8 @ryelle
3 years ago

I think it's fine to commit to trunk then backport as is would fix the issue in trunk (trunk will show the 5.7 about page until the new about page is committed :)

That's what I was thinking too, but wanted to double check. Thanks! :)

Note: See TracTickets for help on using tickets.