Skip to content

Resolve CMS pages, areas, blocks and menus in find-replace results - #466

Merged
hellopablo merged 1 commit into
developfrom
feature/find-replace-resolvers
Nov 2, 2026
Merged

hellopablo merged 1 commit into
developfrom
feature/find-replace-resolvers

Conversation

@hellopablo

@hellopablo hellopablo commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds find-replace resolvers for CMS records. Hits now show what they belong to, instead of table.column #id.

  • CMS Page (cms_page): titled by the published title when published, otherwise the draft title. Declares a closed status facet (PUBLISHED, DRAFT, DELETED) shown as a badge. Links to Edit, except for deleted pages, which the editor cannot open.
  • CMS Area (cms_area) and CMS Block (cms_block): titled by label, with Edit links.
  • CMS Menu (cms_menu, cms_menu_item): a menu is titled by its label. An item is titled Menu › Item and links to its menu's edit screen, where items are edited.

Testing

  • Unit tests cover titles, entity labels, facets and action URLs, using stubbed row loaders; composer test passes.
  • PHPStan: no new errors against the base branch.
  • Checked end to end in a pre-new-admin app with real data: every resolver is listed by find-replace:fields, and find-replace:search returns titled hits for each table, with links to the right admin routes. On develop, links come from Controller::url(). No develop app was available to run them live. Large tables (e.g. ~20k survey answers) resolve; ID lookups are chunked because a single long where_in overflowed CodeIgniter's query builder.

Docs: nails/docs#36. Ported to feature/pre-new-admin in #467.

🤖 Generated with Claude Code

Pages, areas, blocks, menus and menu items name the record behind each hit and
link to its edit screen. Menu items open their menu. Pages carry a status facet
and badge; deleted pages have no edit link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hellopablo
hellopablo merged commit 6583199 into develop Nov 2, 2026
5 checks passed
@hellopablo
hellopablo deleted the feature/find-replace-resolvers branch November 2, 2026 11:18
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