Make WordPress Core

Opened 2 years ago

Closed 23 months ago

Last modified 23 months ago

#55653 closed defect (bug) (duplicate)

Undefined array key "path" in canonical.php on line 590

Reported by: antont39's profile antont39 Owned by:
Milestone: Priority: normal
Severity: trivial Version: 5.9.3
Component: Permalinks Keywords: has-patch
Focuses: Cc:

Description

I get an warning message on the main page when I'm at /page/1 and permalink(/%category%/%postname%) is set without a trailing slash.
And there is no redirect /page/1 -> /

Change History (5)

This ticket was mentioned in PR #2759 on WordPress/wordpress-develop by enricobattocchi.


23 months ago
#1

  • Keywords has-patch added

Make sure $redirect['path'] is defined after parsing the $redirect_url.

Trac ticket: https://core.trac.wordpress.org/ticket/55653

#2 @lopo
23 months ago

Welcome @antont39 and thanks for reporting this!
I can reproduce the problem on 6.0.
At first I was considering forcing a / when setting a custom permalink, but the issue is there even if you set "Numeric" (i.e. /archives/%post_id%) which is a default choice in the Permalinks page.

Pushed a PR but on second thought is looks like it's a duplicate of #51725 and the solution there seems to be working.

#3 @lopo
23 months ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #51725.

enricobattocchi commented on PR #2759:


23 months ago
#4

Closing since it's a duplicate of https://core.trac.wordpress.org/ticket/51725 and the solution there looks smarter.

#5 @desrosj
23 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.