Make WordPress Core

Opened 4 months ago

Last modified 4 months ago

#63666 new defect (bug)

Multiple tags in URL broken in 6.8

Reported by: frogsplash's profile frogsplash Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.8
Component: Query Keywords: has-patch has-test-info
Focuses: Cc:

Description

Hi gang, thanks for all the work y'all do. I've been a WordPress user for a looooong time, really appreciate the community's efforts over the years.

There's a new "bug" that got introduced into 6.8, and it's unfortunately broken a lot of my websites. (I say "bug", but maybe there was a reason this change was made.)

Short and sweet: the ability to filter tags via the URL has been incredibly useful. I run many asset library type websites, and being able to display certain posts by their tags is essential.

Example:

https://bagofhurt.com/tag/2025+test-tag-1/

In this example, this page lists all posts that have both of these two tags. All good so far. The kicker comes when you flip the tags:

https://bagofhurt.com/tag/test-tag-1+2025/

While you get the same post result, the listed tag in the H1 still says "2025."


To contrast, here's the same page in WP 6.7.2:

https://bagofhurt.com/old/tag/test-tag-1+2025/

The tag listed first in the query has always been used for the H1 display – until 6.8. It looks like it now uses the first tag alphabetically, regardless of the order.


I don't know the WP codebase well enough to tell someone where to look, but if this an easy fix, I would greatly appreciate a patch. Or if there's a better way for me to replicate the behavior I'm after?

It looks like this thread might be related: https://core.trac.wordpress.org/ticket/63255

Change History (3)

This ticket was mentioned in PR #9201 on WordPress/wordpress-develop by @Presskopp.


4 months ago
#1

  • Keywords has-patch added

#2 @websiteredev
4 months ago

  • Keywords has-test-info added

Reproduction Report

This report validates that the issue can be reproduced.

Environment

  • OS: Windows 10 Build 19045
  • Web Server: Nginx
  • PHP: 8.2.27
  • WordPress: 6.8.1
  • Browser: Chrome Version 137
  • Theme: Twenty Twenty-Five
  • Active Plugins:
    • None - Fresh Install

Actual Results

  • ✅ Error condition occurs (reproduced).

Steps

  1. Created new site on WP 6.8.1
  2. Added tags "test1" and "abababa" to Hello world! post
  3. Navigate to /tag/test1+abababa/
  4. H1 shows as "Tag: abababa" with Hello world! post listed
  5. Navigate to /tag/abababa+test1/
  6. H1 shows as shows "Tag: abababa" with Hello world! post listed

#3 @websiteredev
4 months ago

Patch Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/9201

Environment

  • OS: Windows 10 Build 19045
  • Web Server: PHP.wasm
  • PHP: 7.4.31
  • WordPress: WordPress 6.9-alpha-20250706.084457
  • Browser: Chrome Version 137
  • Theme: Twenty Twenty-Five
  • Active Plugins:
    • None - Fresh Install

Steps

  1. Create new site using WP Playground link from PR #9201
  2. Added tags "test1" and "abababa" to Hello world! post
  3. Navigate to /tag/test1+abababa/
  4. H1 shows as "Tag: test1" with Hello world! post listed
  5. Navigate to /tag/abababa+test1/
  6. H1 shows as "Tag: abababa" with Hello world! post listed

Actual Results

  • ✅ Issue resolved with patch.
Last edited 4 months ago by websiteredev (previous) (diff)
Note: See TracTickets for help on using tickets.