Skip to content

[8.2-stable] fix(Publishable): Use Time.current in publishable?#3867

Open
tvdeyen wants to merge 2 commits into8.2-stablefrom
backport/8.2-stable/pr-3866
Open

[8.2-stable] fix(Publishable): Use Time.current in publishable?#3867
tvdeyen wants to merge 2 commits into8.2-stablefrom
backport/8.2-stable/pr-3866

Conversation

@tvdeyen
Copy link
Copy Markdown
Member

@tvdeyen tvdeyen commented Apr 29, 2026

What is this pull request for?

Backport of #3866 to 8.2-stable.

Publishable#publishable? was delegating to still_public_for? without an explicit at: argument, so the check defaulted to Current.preview_time. When an editor selected a future preview time and then hit Publish, any element whose public_until was in the future relative to now but before the previewed moment was treated as already expired and was silently excluded from the public version of the page.

To keep the fix minimal and consistent with the keyword-argument signature on the Publishable concern, the redundant still_public_for? / already_public_for? / public? overrides on PageVersion are removed first (cherry-picked from c402e58 on main).

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

tvdeyen added 2 commits April 29, 2026 22:27
The Publishable concern provides the same instance methods,
but with a slightly different signature. Since these methods
are identical and only used internally we can remove them.
The publishable? predicate was delegating to still_public_for? without
passing an explicit time, so it defaulted to Current.preview_time. When
an editor selected a future preview time and then hit Publish, any
element whose public_until was in the future relative to now but before
the previewed moment was treated as already expired and was silently
excluded from the public version of the page.
@tvdeyen tvdeyen requested a review from a team as a code owner April 29, 2026 20:31
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.07%. Comparing base (2280915) to head (d987e03).
⚠️ Report is 1 commits behind head on 8.2-stable.

Additional details and impacted files
@@             Coverage Diff             @@
##           8.2-stable    #3867   +/-   ##
===========================================
  Coverage       98.06%   98.07%           
===========================================
  Files             322      322           
  Lines            8547     8558   +11     
===========================================
+ Hits             8382     8393   +11     
  Misses            165      165           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant