Database error

This topic contains 6 replies, has 4 voices, and was last updated by  Alex Rollin 2 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #528832

    Barbara Magee
    Full Member
    Post count: 146

    We are getting the following Geodirectory-related error in a persistent manner, as per my webhost. Can you advise what is happening and a fix?

    WordPress database error
    Unknown column ‘distance’ in ‘order clause’ for query SELECT mmfwc_posts.*,
    mmfwc_geodir_gd_place_detail.* FROM mmfwc_posts
    INNER JOIN mmfwc_geodir_gd_place_detail ON
    (mmfwc_geodir_gd_place_detail.post_id = mmfwc_posts.ID)
    WHERE 1=1 AND ( mmfwc_posts.post_status = ‘publish’ )
    AND mmfwc_posts.post_type = ‘gd_place’
    GROUP BY mmfwc_posts.ID
    ORDER BY distance ASC
    LIMIT 0, 8
    made by require(‘wp-blog-header.php’),
    require_once(‘wp-includes/template-loader.php’),
    include(‘/themes/Avada/100-width.php’),
    the_content,
    apply_filters(‘the_content’),
    WP_Hook->apply_filters,
    do_shortcode,
    preg_replace_callback,
    do_shortcode_tag,
    FusionSC_Container->render,
    do_shortcode,
    preg_replace_callback,
    do_shortcode_tag,
    fusion_builder_row,
    do_shortcode,
    preg_replace_callback,
    do_shortcode_tag,
    FusionSC_Column->render,
    do_shortcode,
    preg_replace_callback,
    do_shortcode_tag,
    FusionSC_Code_Block->render,
    do_shortcode, preg_replace_callback, do_shortcode_tag,
    WP_Super_Duper->shortcode_output,
    GeoDir_Widget_Listings->output,
    GeoDir_Widget_Listings->output_html, geodir_get_widget_listings

    #528868

    Kor
    Moderator
    Post count: 16516

    Hi Barbara Magee,

    Thanks for your post. Please share both WP and FTP access here in private reply and we’ll investigate this further for you.

    #528960

    Barbara Magee
    Full Member
    Post count: 146
    This reply has been marked as private.
    #529198

    Barbara Magee
    Full Member
    Post count: 146
    This reply has been marked as private.
    #529226

    Kiran
    Moderator
    Post count: 7069

    Hi Barbara,

    I have checked almost all pages from frontend & could not replicate error from my side.

    Can you ask your webhost on which pages the error occurred?

    Thanks,
    Kiran

    #529355

    Barbara Magee
    Full Member
    Post count: 146

    Below is the exact response from my webhost. Thanks!

    Cross-referencing the timestamps from the \logs\php_errors.log and your raw logs at \logs\W3SVC71\ the page that is generating the PHP error (as below) is https://thelocaldish.com/locationnew/.

    \logs\php_errors.log
    [07-Feb-2020 18:22:53 UTC] WordPress database error Unknown column ‘distance’ in ‘order clause’ for query SELECT mmfwc_posts.*, mmfwc_geodir_gd_place_detail.* FROM mmfwc_posts
    INNER JOIN mmfwc_geodir_gd_place_detail ON (mmfwc_geodir_gd_place_detail.post_id = mmfwc_posts.ID)
    WHERE 1=1 AND ( mmfwc_posts.post_status = ‘publish’ ) AND mmfwc_posts.post_type = ‘gd_place’
    GROUP BY mmfwc_posts.ID
    ORDER BY distance ASC
    LIMIT 0, 8 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/Avada/100-width.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, FusionSC_Container->render, do_shortcode, preg_replace_callback, do_shortcode_tag, fusion_builder_row, do_shortcode, preg_replace_callback, do_shortcode_tag, FusionSC_Column->render, do_shortcode, preg_replace_callback, do_shortcode_tag, FusionSC_Code_Block->render, do_shortcode, preg_replace_callback, do_shortcode_tag, WP_Super_Duper->shortcode_output, GeoDir_Widget_Listings->output, GeoDir_Widget_Listings->output_html, geodir_get_widget_listings

    \logs\W3SVC71\u_ex200207.log
    2020-02-07 18:22:56 W3SVC71 tsarbomba 192.168.1.170 GET /locationnew/ – 443 – 66.241.70.11 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 _gd_logged_out_post_author=57615c196d;+wpinv_session_eab85fcef8046ddf12900bd6653fa150=87458093f9%7C%7C1581272572%7C%7C1581268972%7C%7C7d7de67da7b1ecfd98e3e8de4097d7fa;+cookielawinfo-checkbox-necessary=yes;+cookielawinfo-checkbox-non-necessary=yes – thelocaldish.com 200 0 0 37631 771 171

    #529384

    Alex Rollin
    Moderator
    Post count: 27815

    That page had a location filter running in the shortcode. That page does not have a location, though, it may have been intended to use it as the location page template for GD at some point.

    I have changed the shortcode to turn off the location filter.

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket