You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When wp_insert_comment is called, a function is fired which maybe indexes the comment, but it has a capability check. If the user does not have the ability to edit comments, the function returns.
This is great for updating comments, but the same function is used for comment creation, breaking comments left by logged out users.
What ElasticPress features do you have currently active?
Additional context
We have a custom comment type for reactions, and found recently after updates that anonymous/guest users could no longer use this feature. On closer inspection it turns out it was not being indexed in ES. We know this because Elasticpress is disabled for queries when is_admin is true andd WP Admin reported the correct data, the frontend/REST API which has it enabled however did not update.
The text was updated successfully, but these errors were encountered:
I also think the capability checkss could be problematic, e.g. if a comment is edited because a plugin modified it automatically, even though the user does not have that capability, in that situation Elasticpress would not index the modification and it would desync
Describe the bug
When
wp_insert_comment
is called, a function is fired which maybe indexes the comment, but it has a capability check. If the user does not have the ability to edit comments, the function returns.This is great for updating comments, but the same function is used for comment creation, breaking comments left by logged out users.
https://github.com/10up/ElasticPress/blob/develop/includes/classes/Indexable/Comment/SyncManager.php#L56-L66
The capability check in question: 9267d24
Steps to Reproduce
Expected behavior
The guest comment should be indexed, it is not.
Environment information
"10up/elasticpress": "^3.6"
Additional context
We have a custom comment type for reactions, and found recently after updates that anonymous/guest users could no longer use this feature. On closer inspection it turns out it was not being indexed in ES. We know this because Elasticpress is disabled for queries when
is_admin
is true andd WP Admin reported the correct data, the frontend/REST API which has it enabled however did not update.The text was updated successfully, but these errors were encountered: