Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 16, 20223 yr Updated a forum to 4.6.9 yesterday, and at the same time updated Elastic to the highest supported version - 7.16.3. Woke up to lots of these errors in the log caused by a stream periodically fetched as RSS. [error] => Array ( [root_cause] => Array ( [0] => Array ( [type] => x_content_parse_exception [reason] => [1:8714] [bool] failed to parse field [should] ) ) [type] => x_content_parse_exception [reason] => [1:8714] [bool] failed to parse field [filter] [caused_by] => Array ( [type] => x_content_parse_exception [reason] => [1:8714] [bool] failed to parse field [should] [caused_by] => Array ( [type] => illegal_state_exception [reason] => expected value but got [START_ARRAY] ) ) ) The issue in the JSON appears to be here: { "bool": { "should": [ { "bool": { "filter": [ { "terms": { "index_class": [ "IPS\\forums\\Topic\\Post" ] } }, { "terms": { "index_item_id": [ 657215, .......... 785214 ] } } ] } }, [<--- HERE, this is 1:8714 { "terms": { "index_author": [ 61654, 151262, 204067, 204990, 272358, 503699, 554475 ] } } ] ] } }, The latter "terms" should not have been in brackets. This is caused by too many array()'s added to the condition in Elastic\Query.php /* Are we including content posted by followed members? */ if ( $includeMembers and $followed = iterator_to_array( \IPS\Db::i()->select( 'follow_rel_id', 'core_follow', array( 'follow_app=? AND follow_area=? AND follow_member_id=?', 'core', 'member', $this->member->member_id ), 'follow_rel_id asc' ) ) ) { $conditions[] = array( array( 'terms' => array( 'index_author' => $followed ) ) ); } I've removed one of those arrays and that seems to have solved the issue.
January 17, 20223 yr Community Expert I have tagged our developers in to review this. If this is a bug here we can get this logged and resolved
January 25, 20223 yr Community Expert Thank you for letting us know, this will be fixed in an upcoming release.
January 25, 20223 yr Community Expert Solution This issue has been resolved in 4.6.10 beta 1. Feel free to give this a try, or await the full release if you prefer