Skip cancelled events in city redirect and latest site hints#40
Open
dd32 wants to merge 3 commits intoproductionfrom
Open
Skip cancelled events in city redirect and latest site hints#40dd32 wants to merge 3 commits intoproductionfrom
dd32 wants to merge 3 commits intoproductionfrom
Conversation
Cancelled WordCamp events should not be the redirect target for city.wordcamp.org URLs, nor should they appear as the 'next edition' in the latest site hints banner. Join the blogs table with the central blog posts/postmeta tables to check the WordCamp post status, filtering out wcpt-cancelled events. Sites without a linked WordCamp post are still included (NULL check). Fixes WordPress#1600 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The cancelled event filter variables and table prefix are safe SQL fragments built from internal logic, not user input. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add cancelled sites (2020.seattle and vancouver/2021) to the shared test database with WordCamp posts set to wcpt-cancelled status. Verify that get_latest_home_url and get_latest_site skip cancelled events and return the previous non-cancelled year instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
city.wordcamp.orgURLsgranada.wordcamp.orgwill now redirect to the 2024 (completed) event instead of the cancelled 2025 oneChanges
Two files updated with the same approach:
sunrise-wordcamp.php-get_latest_site(): JOIN with the central blog posts/postmeta tables to check WordCamp post status, excludingwcpt-cancelledlatest-site-hints.php-get_latest_home_url(): Same JOIN pattern applied to all three query variants (year.city, city/year, and events.wordpress.org paths)Both use LEFT JOINs with a NULL check, so sites without a linked WordCamp post are still included.
Test plan
city.wordcamp.orgredirects to the previous (non-cancelled) editionFixes WordPress#1600
🤖 Generated with Claude Code