[wp-trac] [WordPress Trac] #59766: Custom post type archive URLs are being resolved in an unexpected way if a page with the same slug exists and the URL's casing doesn't exactly match the custom post type's rewrite slug

WordPress Trac noreply at wordpress.org
Thu Jan 18 20:12:31 UTC 2024


#59766: Custom post type archive URLs are being resolved in an unexpected way if a
page with the same slug exists and the URL's casing doesn't exactly match
the custom post type's rewrite slug
-------------------------------+------------------------------
 Reporter:  nonverbla          |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  6.3.2
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+------------------------------

Comment (by nonverbla):

 I've created a Gist of what's necessary for me to work around this issue.
 Posting it here as it may be useful for others, as well. Hope it's not too
 off-topic.

 https://gist.github.com/hirasso/844c6aadf4c7931751c5a3f7e338476c

 The script redirects URLs to their lowercase counterpart on the server as
 well as on the client side (that can become necessary when the page is
 being served by a static html page created by a caching plugin).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59766#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list