Similar threads

Similar threads [Paid] 8.5

No permission to buy ($35.00)
I found a bug in the Similar Threads Addon , when using enhanced search,
it is possible in come circumstances for the method getSimilarThreadsEnhanced to receive a
NULL value for "currentNodeId".

This is passed into the Elastic Search query unchecked , this causes a lot of Server Errors (something like this)

  • GuzzleHttp\Exception\ClientException: Similar threads error: Client error: POST http://{OBFUSCATED AWS ES URL }/xenforo-prod/xf/_search resulted in a 400 Bad Request response: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"field name is null or empty"}],"type":"illegal_ar (truncated...)
  • src/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
This doesnt seem to manifest in a visible way on the front facing part of the forums but this is very spammy and making a LOT
of request to elastic search that we know will fail before they are sent.

My fix , is to just

if (!$currentNodeId){
return;
}

right after the check for excluded forums (line 527).

This prevents the query from being sent and acts as if no results were returned.

Please could you look into this and maybe patch the plugin so that we dont have to
manage updates seperately?

Thanks

Nick
 
I found a bug in the Similar Threads Addon , when using enhanced search,
it is possible in come circumstances for the method getSimilarThreadsEnhanced to receive a
NULL value for "currentNodeId".

This is passed into the Elastic Search query unchecked , this causes a lot of Server Errors (something like this)

  • GuzzleHttp\Exception\ClientException: Similar threads error: Client error: POST http://{OBFUSCATED AWS ES URL }/xenforo-prod/xf/_search resulted in a 400 Bad Request response: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"field name is null or empty"}],"type":"illegal_ar (truncated...)
  • src/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
This doesnt seem to manifest in a visible way on the front facing part of the forums but this is very spammy and making a LOT
of request to elastic search that we know will fail before they are sent.

My fix , is to just

if (!$currentNodeId){
return;
}

right after the check for excluded forums (line 527).

This prevents the query from being sent and acts as if no results were returned.

Please could you look into this and maybe patch the plugin so that we dont have to
manage updates seperately?

Thanks

Nick

I have now realised that this error is triggered when the "Same Forum" option is selected in the Addon Options.
disabling this also stops the errors from being flagged. Either way it feels there needs to be a bit more work done on this
plugin with regards to supporting Elastic Search (I use AWS for this)
 
Hi,

it looks like a Javascript is still fired, even if both Options to show Similar Threads on Thread Creation is disabled. The Screenshot was made on the Forumlists Quick Thread Form, after entering the Title, ...
st_javascript.webp
Regards,

Tobi
 
I'm seeing similar Elasticsearch GuzzleHttp errors using Andy's Change Date add-on after upgrading to Elasticsearch 7.0.1, although no such errors for Similar threads.
 
Does this not work on iPhone 8 Safari? Using the latest iOS software and similar threads don’t show.
 
Andy FYI I installed this on AVForums.com today (along with about 60 other addons having migrated to XF2) and it absolutely killed the server.
Too many connection errors for over an hour while we tracked down what the issue was.
I was convinced it was a DOS attack.
Disabling Similar Threads stopped it completely.
Has it been tested on a big forum?
 
Andy FYI I installed this on AVForums.com today (along with about 60 other addons having migrated to XF2) and it absolutely killed the server.
Too many connection errors for over an hour while we tracked down what the issue was.
I was convinced it was a DOS attack.
Disabling Similar Threads stopped it completely.
Has it been tested on a big forum?

25M messages forum with Elastic shouldn't be any problem.
 
Top Bottom