Skip to content

fix: do not serve soft-deleted pages - #255

Draft
TwoDCube wants to merge 1 commit into
test/integrationfrom
fix/soft-deleted-pages
Draft

TwoDCube wants to merge 1 commit into
test/integrationfrom
fix/soft-deleted-pages

Conversation

@TwoDCube

Copy link
Copy Markdown
Member

Fixes a bug recorded by the tests in #247. Stacked on #247 (base test/integration), so this is a draft until #246 and #247 merge.

Bug

pages rows are soft-deleted: deleting a page sets deleted_at and keeps the row. page(slug) did not filter on deleted_at, so deleted pages were still served.

Fix

page(slug) only returns rows where deleted_at IS NULL.

A menu item that links to a deleted page still returns the page's slug. website_frontend2 then receives page: null for that slug and redirects to its 404 page.

Tests

  • soft_deleted_page_is_not_served is no longer ignored.
  • No snapshots change.
  • cargo clippy --workspace --all-targets -D warnings is clean. CI=true cargo test --workspace passes against MySQL 8.4 and Redis 6.2.

🤖 Generated with Claude Code

Pages are soft-deleted: the row stays and deleted_at is set. The page
resolver ignored deleted_at, so a deleted page was still served by its slug.
Only return pages whose deleted_at is NULL.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@verseghy-prow

verseghy-prow Bot commented Sep 14, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: TwoDCube

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@verseghy-prow verseghy-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant