WordPress.org

Making WordPress.org

Opened 7 months ago

Last modified 2 weeks ago

#4686 reopened defect

Empty tag archives on make / design (and elsewhere) should return 404 behaviour

Reported by: jonoaldersonwp Owned by:
Milestone: Priority: low
Component: Make (Get Involved) / P2 Keywords: seo analytics close
Cc:

Change History (6)

#1 @dd32
6 months ago

As 23282d is an actual tag on the site, is there an upstream ticket on core.trac.wordpress.org to reference for this behaviour (and/or to fix the behaviour?)

#2 @jonoaldersonwp
6 months ago

There are some scenarios where an empty tag should still return a valid response (e.g., when it has 'content', purpose, etc).

IMO, the default should be to 404 these, but there are people who're using them in the wild.

A core fix, therefore, becomes rather complicated.

Let's fix here in the meantime?

#3 @dd32
2 weeks ago

Just noting that this behaviour is intentional in WordPress as of https://core.trac.wordpress.org/changeset/8761

and an upstream ticket for this is https://core.trac.wordpress.org/ticket/44848

Last edited 2 weeks ago by dd32 (previous) (diff)

#4 @dd32
2 weeks ago

  • Resolution set to reported-upstream
  • Status changed from new to closed

I'm going to close this as reported-upstream based on https://core.trac.wordpress.org/ticket/44848. Changing the behaviour here can be fixed in core, and isn't going to be changed on WordPress.org.

In the meantime, I've removed the hex-colour-tags on design that were unused.

#5 @jonoaldersonwp
2 weeks ago

  • Resolution reported-upstream deleted
  • Status changed from closed to reopened

As I mentioned above, there are valid scenarios on other websites where an empty archive should return a 200 status (e.g., when the theme outputs a description and/or template content). As such, a sweeping 'fix' isn't suitable - as https://core.trac.wordpress.org/ticket/44848 discusses.

In our case, however, we know that an empty archive should always return a 404. Given the simplicity and low surface area of the issue, we should fix it locally.

#6 @ocean90
2 weeks ago

  • Keywords close added

In this case it seems to be easier to just delete the tags without posts as Dion already did.

Note: See TracTickets for help on using tickets.