Database error
This topic contains 6 replies, has 4 voices, and was last updated by Alex Rollin 5 years, 1 month ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
February 5, 2020 at 12:38 am #528832
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_listingsFebruary 5, 2020 at 8:53 am #528868Hi 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.
February 5, 2020 at 8:58 pm #528960This reply has been marked as private.February 6, 2020 at 10:42 pm #529198This reply has been marked as private.February 7, 2020 at 4:02 am #529226Hi 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,
KiranFebruary 7, 2020 at 10:22 pm #529355Below 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 171February 7, 2020 at 11:37 pm #529384That 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.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket