Skip to content

fix(migrations): skip deleted-site content - #293

Merged
engram-design merged 1 commit into
verbb:craft-5from
boboldehampsink:feature/skip-deleted-site-content
Nov 4, 2026
Merged

engram-design merged 1 commit into
verbb:craft-5from
boboldehampsink:feature/skip-deleted-site-content

Conversation

@boboldehampsink

Copy link
Copy Markdown
Contributor

Hyper's upgrade scans can encounter retained elements_sites rows for a soft-deleted site. Craft rejects that site ID before loading the element, so relation reconciliation aborts with Unable to resolve Hyper relation owner even when the element record is intact.

Exclude unavailable site contexts during relation reconciliation, using Craft's site lookup with disabled sites included. Apply the same deleted-site exclusion to legacy content relation scans on their configured database connection. Stored content is preserved and ordinary content modifications retain their strict owner validation.

The regression cases cover both migration entry points, deleted and disabled sites, current and legacy storage, dry-run behavior and unchanged content.

@engram-design
engram-design merged commit 1484b69 into verbb:craft-5 Nov 4, 2026
5 checks passed
@engram-design

Copy link
Copy Markdown
Member

Thanks @boboldehampsink !

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.

2 participants