What makes you think this is coming from Relevanssi? That file reference is WordPress core, not Relevanssi. Can you please provide more information about how this is linked to Relevanssi?
Thanks for the quick reply. I’m just going off of what Query Monitor is telling me. Under “Component” it says “Plugin: relevanssi” for this error.
Can you please show me more information? This isn’t enough for me to say anything about this. Perhaps share a screenshot of the Query Monitor display? I can’t link this to anything Relevanssi does. When are you getting this error? During searches?
Sorry about that. The error shows on the search results page even before any headers have been sent. When Relevanssi is disabled the error goes away.
Here’s the “Location” of the error in Query Monitor:
wp-includes/media.php:1676
wp_image_add_srcset_and_sizes()
wp-includes/media.php:2010
wp_img_tag_add_srcset_and_sizes_attr()
wp-includes/media.php:1838
wp_filter_content_tags()
wp-includes/class-wp-hook.php:307
apply_filters('the_content')
wp-content/plugins/relevanssi/lib/excerpts-highlights.php:138
relevanssi_do_excerpt()
wp-content/plugins/relevanssi/lib/excerpts-highlights.php:1531
relevanssi_add_excerpt()
wp-content/plugins/relevanssi/lib/search.php:672
relevanssi_do_query()
wp-content/plugins/relevanssi/lib/search.php:84
relevanssi_query()
wp-includes/class-wp-hook.php:307
apply_filters_ref_array('posts_pre_query')
wp-includes/class-wp-query.php:3055
WP_Query->get_posts()
wp-includes/class-wp-query.php:3586
WP_Query->query()
wp-includes/class-wp.php:648
WP->query_posts()
wp-includes/class-wp.php:775
WP->main()
wp-includes/functions.php:1330
wp()
wp-blog-header.php:16
I actually thought it was clear it was coming from Relevanssi, but if it’s not please let me know so I can try to dig in deeper first.
Relevanssi triggers this warning, but it’s not coming from Relevanssi. It’s happening when Relevanssi creates the excerpts and runs the_content
filters on the post content, but the actual error is coming from the core wp_image_add_srcset_and_sizes()
function. I’m not sure why the array index would be missing from the image meta; Relevanssi does not interact with this directly.
Ok, thanks. Sorry for the confusion.
Just following up. I deleted the PDF file and re-uploaded it and the problem went away. No idea what was causing it.