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

SearchableDataObject does take into account SiteTree versioned #5

Closed
axyr opened this issue Jan 12, 2015 · 2 comments
Closed

SearchableDataObject does take into account SiteTree versioned #5

axyr opened this issue Jan 12, 2015 · 2 comments

Comments

@axyr
Copy link

axyr commented Jan 12, 2015

SearchableDataObject::onAfterWrite gives ambigous ID when saving a Page with extra fields.
This fixes the problem for me:

$table = $this->owner->class;
if(is_a($this->owner, 'SiteTree') && Versioned::current_stage() == 'Live') {
$table = 'SiteTree_Live';
}
$filterID = $table . ".ID={$this->owner->ID}";

@g4b0
Copy link
Owner

g4b0 commented Jan 12, 2015

Please provide a PR, I will be happy to merge it. Please provide also a sample of non working page type, just for test it before merging.

@g4b0
Copy link
Owner

g4b0 commented Jun 5, 2015

Now that versions are handled in SearchableDataObject::onAfterWrite do you think that I can close your issue, or it's still valid?

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

2 participants