Skip to content

fix: load a menu item's page whenever its slug is selected - #259

Draft
TwoDCube wants to merge 1 commit into
fix/soft-deleted-menu-itemsfrom
fix/menu-slug-selection
Draft

TwoDCube wants to merge 1 commit into
fix/soft-deleted-menu-itemsfrom
fix/menu-slug-selection

Conversation

@TwoDCube

Copy link
Copy Markdown
Member

Fixes a bug recorded by the tests in #247. Stacked on #256 (base fix/soft-deleted-menu-items), because both change the same lines of menu.rs. This is a draft until #246, #247 and #256 merge.

Bug

menu and MenuItem.children added page_id to the SQL selection only when link was requested, but slug is the field that needs page_id. { menu { name slug } } therefore returned slug: null for every item. website_frontend2 always selects link together with slug, so the site is not affected today.

Fix

Select page_id when slug is requested. link is a plain column and never needed it.

Tests

  • menu_slug_does_not_depend_on_selecting_link is no longer ignored, and now also checks a child item's slug.
  • No snapshots change: all of them select link as well.
  • 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

The menu resolvers only added page_id to the SQL selection when link was
requested, but page_id is what slug needs, so `{ menu { slug } }` returned
null slugs. Select page_id when slug is requested.

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