Skip to content

[6.x] Forms 2: Fix incomplete class error when filtering submissions by site - #15640

Closed
jasonvarga wants to merge 1 commit into
forms-2from
forms-2-submission-site-index
Closed

jasonvarga wants to merge 1 commit into
forms-2from
forms-2-submission-site-index

Conversation

@jasonvarga

Copy link
Copy Markdown
Member

The forms listing (and the submission site filter) query submissions with where('site', ...). Submissions used the generic Value index for this, which resolves site through getQueryableValue() and stores a Site object for every submission.

The index is persisted to the Laravel cache. When cache.serializable_classes is restricted (newer Laravel skeletons default it to false), Site isn't on the allowlist, so on any request that reads the cached index the values come back as __PHP_Incomplete_Class and the query throws:

strtolower(): Argument #1 ($string) must be of type string, __PHP_Incomplete_Class given

It's intermittent because the request that builds the index works fine; only subsequent cached reads fail.

This adds a dedicated site store index for submissions that stores the site handle, matching how entries and terms index their site. Querying by a Site object still works since comparisons cast it to its handle.

🤖 Generated with Claude Code

The generic Value index stored Site objects, which become __PHP_Incomplete_Class when the index is read back from a cache with cache.serializable_classes restricted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonvarga

Copy link
Copy Markdown
Member Author

Superseded by #15641, which fixes this in 6.x by making Site a QueryableValue.

@jasonvarga jasonvarga closed this Oct 13, 2026
@jasonvarga
jasonvarga deleted the forms-2-submission-site-index branch October 13, 2026 15:27
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