Hi Mikko,
Unfortunately this did not seem to work. Could this be an Oxygen builder issue again?
I have tested with some other random words now and it does indeed give the WordPress error now (after disabling your code again) for words that are in the page content and not part of the Stopwords Candidates list. In fact it seems to give that error for words in the Oxygen page content, but not for words that are put into the Oxygen content with shortcodes (from other plugins like Easy Accordions). So when I used a word in an accordion that isn’t used anywhere else inside the actual Oxygen page content, it will give a result for the page on which that shortcode is embedded.
Here is an example of an error that is not a stopword candidate:
[02-Feb-2021 07:02:12 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to relevanssi_strip_tags() must be of the type string, null given, called in /xxx/xxx/xxx/xxx/wp-content/plugins/relevanssi/lib/excerpts-highlights.php on line 184 and defined in /xxx/xxx/xxx/xxx/wp-content/plugins/relevanssi/lib/utils.php:737
Stack trace:
#0 /xxx/xxx/xxx/xxx/wp-content/plugins/relevanssi/lib/excerpts-highlights.php(184): relevanssi_strip_tags(NULL)
#1 /xxx/xxx/xxx/xxx/wp-content/plugins/relevanssi/lib/search.php(1006): relevanssi_do_excerpt(Object(stdClass), 'metro', '20', 'words')
#2 /xxx/xxx/xxx/xxx/wp-content/plugins/relevanssi/lib/search.php(94): relevanssi_do_query(Object(WP_Query))
#3 /xxx/xxx/xxx/xxx/wp-includes/class-wp-hook.php(287): relevanssi_query(NULL, Object(WP_Query))
#4 /xxx/xxx/xxx/xxx/wp-includes/plugin.php(255): WP_Hook->apply_filters(NULL, Array)
#5 /xxx/xxx/xxx/xxx/wp-includes/class-wp-query.php(2951): apply_filters_ref_array('post in /xxx/xxx/xxx/xxx/wp-content/plugins/relevanssi/lib/utils.php on line 737
So is this yet again an Oxygen issue?