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

BUG Fix delete / unpublish #138

Merged
merged 0 commits into from
Mar 9, 2017

Conversation

tractorcow
Copy link

Split SearchUpdater classes into separate files
Fixes #134

@tractorcow
Copy link
Author

This works, where the existing solution didn't because:

  • Versioned nukes any manipulation against a class without a table. This means if the class only had fields in a parent class (E.g. Page, occasionally) the deletion wouldn't work. Fixed by using the entire hierarchy, so at least one table gets passed through.
  • SearchUpdater nukes any manipulation with empty fields key. Fixed by adding an special 'delete' action and having the updater exclude that from the filter.

@tractorcow
Copy link
Author

Green. :D todo,merge into master once merge into 2.3


SearchUpdater::flush_dirty_indexes();

$this->assertEquals(1, count(self::$index->deleted));
Copy link
Contributor

Choose a reason for hiding this comment

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

$this->assertCount(1, self::$index->deleted)

@dhensby dhensby merged commit bbaf427 into silverstripe:2.3 Mar 9, 2017
@dhensby
Copy link
Contributor

dhensby commented Mar 9, 2017

merged into master

@tractorcow tractorcow deleted the pulls/fix-unpublish branch March 10, 2017 03:59
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.

None yet

2 participants