Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Set ShowInSearch db boolean default to true #98

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

lukereative
Copy link
Contributor

@lukereative lukereative commented Jul 3, 2024

Fix for #99

There was a fairly recent change (v3.0.3) that added a 'ShowInSearch' field to the SearchServiceExtension. The change also had a $defaults definition to default the value to true, however this only works for new records not existing ones.

Consequently for anyone upgrading existing projects, any DataObject (excluding SiteTree based ones) that uses this extension would have the 'ShowInSearch' column added and any existing records would use the database default of 0 which causes them all to become unindexed upon a full reindex.

I've added in a database default for the 'ShowInSearch' boolean definition to default to 1 so that existing records are captured and hopefully no-one else gets caught out.

Copy link
Collaborator

@chrispenny chrispenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@chrispenny chrispenny merged commit 6922a88 into silverstripe:3 Jul 3, 2024
9 checks passed
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