Directory

Latest Site Hint: Don't hint when the year is the same. by dd32 · Pull Request #1239 · WordPress/wordcamp.org · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Site Hint: Don't hint when the year is the same. #1239

Closed
wants to merge 12 commits into from

Conversation

dd32
Copy link
Member

@dd32 dd32 commented Feb 2, 2024

I've created an additional site for Canada 2024, such that they can have an English and French site. See https://wordpress.slack.com/archives/C08M59V3P/p1706836174954409

However, this has caused the latest site hint to suggest this:

WordCamp Canada 2024 (FR) is over. Check out the next edition!

This change updates the code to strip the -identifier part of /2024-fr/ from the url for the comparison.

How to test the changes in this Pull Request:

  1. Visit https://canada.wordcamp.org/2024-fr/
  2. Notice the banner directing to https://canada.wordcamp.org/2024/
  3. Apply PR
  4. Repeat 1 & 2, but the banner is no longer visible.
  5. Check an older site, for example, https://montreal.wordcamp.org/2019-fr/ still shows the banner.

…as the current site, that has an identifier.
@dd32 dd32 added the [Type] Bug label Feb 2, 2024
@dd32
Copy link
Member Author

dd32 commented Feb 2, 2024

Just noting; I didn't get a chance to add a unit test today, I'll follow up with one next week

@dd32
Copy link
Member Author

dd32 commented Feb 6, 2024

Github actions are completely broken due to unrelated changes, and I can't run unit tests locally due to incompatibilities in how this codebase is setup.

I can't duplicate the failing unit test outside of the unit tests.

@pkevan
Copy link
Contributor

pkevan commented Feb 7, 2024

I tried to fix the tests, but it's going to be stuck between a unit test fail and a static analysis fail atm!

Fix latest static analysis - forgot this was why!
@pkevan
Copy link
Contributor

pkevan commented Feb 16, 2024

Having trouble testing this PR - both locally and on a sandbox - will continue looking later.

To avoid php warning
@pkevan
Copy link
Contributor

pkevan commented Feb 20, 2024

Testing the PR works, just can't figure out why the unit tests are failing

@pkevan
Copy link
Contributor

pkevan commented Mar 1, 2024

Did this another way using a toggle, since there appears to be a few edges cases (probably more too).

@pkevan pkevan closed this Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants