Make WordPress Core

Opened 23 months ago

Last modified 8 months ago

#57525 new defect (bug)

Incorrect home link

Reported by: website-rob's profile Website Rob Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.1
Component: General Keywords: needs-testing
Focuses: performance Cc:

Description

I've noticed that Twenty Twenty-Three Theme does not add a trailing / onto the Home page link when used in a sub-directory. Could also be happening in a top level situation although I've not tested.

example.com/test -instead of- example.com/test/

This cause a 301 redirect and slows down page load.

Not a big deal but then again, the fix is quick and easy.

Change History (7)

#1 @poena
22 months ago

  • Keywords needs-testing added

#2 @poena
22 months ago

Hi! Thank you for the report.

Are you able to add more details about how to reproduce this issue?
I am unsure of if by "home page link" you mean the link in the WordPress admin > General settings WordPress Address (URL) or Site Address (URL), or if you meant a link used in one of the blocks?

Like the site title, custom logo, or the navigation block Home link inner block?

Last edited 22 months ago by poena (previous) (diff)

#3 @Website Rob
22 months ago

<p class="wp-block-site-title"><a href="https://domain.com/wp" target="_self" rel="home" aria-current="page">Domain Website</a></p>

Yes, this link could be considered as WordPress Address (URL) or Site Address (URL) as found in General Settings. This is the only such link being used in the header. Not using tagline or logo.

And now that I'm also seeing target="_self" I have to wonder why that would be needed? URL busting?

#4 @Website Rob
22 months ago

Have now confirmed same situation when top-level dir. is used.

<p class="wp-block-site-title"><a href="https://domain.com" target="_self" rel="home" aria-current="page">domain.com</a></p>

#5 @SergeyBiryukov
15 months ago

  • Component changed from Themes to Bundled Theme
  • Summary changed from Theme - Twenty Twenty-Three - incorrect home link to Twenty Twenty-Three: Incorrect home link

#6 @poena
8 months ago

  • Component changed from Bundled Theme to General

I don't think that this is a theme issue, and it is not specific to bundled themes, nor to the site title block.

get_home_url() does not add trailing slashes.

If your site has unexpected trailing slashes, you may want to first check if you are using custom permalinks that adds slashes.

If your sites redirects are unexpected, they may be related to any redirection plugins you may have installed, but also related to your server configuration.

#7 @poena
8 months ago

  • Summary changed from Twenty Twenty-Three: Incorrect home link to Incorrect home link
Note: See TracTickets for help on using tickets.