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

Dataobjects using SearchServiceExtension become unindexed upon upgrading #99

Closed
2 tasks done
lukereative opened this issue Jul 3, 2024 · 1 comment
Closed
2 tasks done

Comments

@lukereative
Copy link
Contributor

lukereative commented Jul 3, 2024

Module version(s) affected

3.0.3

Description

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.

How to reproduce

  1. Have a project using 3.0.2 of this module or earlier and a dataobject with the SearchServiceExtension applied.
  2. Create one or many of those dataobjects
  3. Upgrade the module to 3.0.3
  4. Run dev/build
  5. Those dataobjects now have 'ShowInSearch' set to 0
  6. Run a full reindex, data object are removed from the index

Possible Solution

I've provided a fix in #98

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
@lukereative
Copy link
Contributor Author

Fix was merged and tagged in 3.0.4

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

No branches or pull requests

1 participant