Support » Plugin: Contextual Related Posts » Related Posts widget not always displaying results

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ajay

    (@ajay)

    Do you have match title and content enabled? If so, would you be able to change the amount of text to be compared to 80 and see if this works. If not reduce accordingly.

    If that still doesn’t work, would you be able to install Query Monitor plugin and see what queries are generated on the page by the plugin

    Thread Starter Simon Elchlepp

    (@simon-elchlepp)

    Thank you as always for your swift reply. I don’t have match title and content enabled.

    However, Query Monitor has picked up a duplicate query and a database error on one of the pages where no related posts appear:

    Database error:

    Query
    Show full columns from ‘its’

    Caller
    WP_Query->get_posts()
    wp-includes/class-wp-query.php:3026
    WP_Query->query()
    wp-includes/class-wp-query.php:3448
    WP_Query->__construct()
    wp-includes/class-wp-query.php:3559
    CRP_Query->__construct()
    wp-content/plugins/contextual-related-posts/includes/class-crp-query.php:112
    get_crp_posts()
    wp-content/plugins/contextual-related-posts/includes/main-query.php:613
    get_crp()
    wp-content/plugins/contextual-related-posts/includes/main-query.php:85
    CRP_Widget->widget()
    wp-content/plugins/contextual-related-posts/includes/modules/class-crp-widget.php:339
    WP_Widget->display_callback()
    wp-includes/class-wp-widget.php:380
    dynamic_sidebar(‘sidebar’)
    wp-includes/widgets.php:823
    genesis_do_sidebar()
    wp-content/themes/genesis/lib/structure/sidebar.php:24
    do_action(‘genesis_sidebar’)
    wp-includes/plugin.php:484
    load_template(‘wp-content/themes/genesis/sidebar.php’)
    wp-includes/template.php:730
    locate_template()
    wp-includes/template.php:676
    get_sidebar()
    wp-includes/general-template.php:136
    genesis_get_sidebar()
    wp-content/themes/genesis/lib/structure/layout.php:333
    do_action(‘genesis_after_content’)
    wp-includes/plugin.php:484

    Component
    Plugin: contextual-related-posts

    Error message
    Table ‘bestwes6_wp898.its’ doesn’t exist

    Error code
    1146

    Duplicate Queries

    Query
    Show full columns from its

    Count
    2

    Caller
    WP_Query->get_posts()
    2 calls

    Component
    Plugin: contextual-related-posts

    Other posts that display related posts don’t generate the above messages. The posts are all written the same way, have the same media components etc., while I only use the plugin in the widgets area – so I’m not sure why some posts generate the error message and some don’t.

    Many thanks,
    Simon

    Plugin Author Ajay

    (@ajay)

    Thanks. Very helpful.

    This database error is one I’m seeing with a few cases. It’s an issue with a preg_match in WPDB/Query which incorrectly detects the wrong table – in your case above it thought the table is called “its” which obviously doesn’t exist.

    Two solutions I think could work. Limit the content of your post above in the List tuning to around 60 words to see if it works.

    Alternatively, in the CRP meta-box at the bottom of your edit screen, enter some keywords of your choice to trigger the related posts.

    I’m yet to figure out a fix for this as it is very sporadic and usually goes once you reduce the amount of text to match

    Thread Starter Simon Elchlepp

    (@simon-elchlepp)

    Thank you so much – limiting the content in the list tuning tab has fixed the issue!

    Plugin Author Ajay

    (@ajay)

    @simon-elchlepp

    Please see below a proposed solution. I’m going to implement this in the 3.0.5

    https://wordpress.org/support/topic/related-posts-not-displaying-sometimes-since-update/#post-14007839

    Thread Starter Simon Elchlepp

    (@simon-elchlepp)

    That’s great news – thanks for your continued work on this great plugin!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.