We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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::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}";
The text was updated successfully, but these errors were encountered:
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.
Sorry, something went wrong.
Now that versions are handled in SearchableDataObject::onAfterWrite do you think that I can close your issue, or it's still valid?
No branches or pull requests
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}";
The text was updated successfully, but these errors were encountered: