Forum breadcrumbs - You are here:Asgaros Support ForumSupportDatabase Error
You need to log in to create posts and topics.

Database Error

Hi Thomas

Sometimes (like once a week or twice a month) I get this error in WP

WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY id ASC LIMIT 1' at line 1 for query SELECT * FROM forum_posts WHERE parent_id = ORDER BY id ASC LIMIT 1; made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/Avada/page.php'), get_header, locate_template, load_template, require_once('/themes/Avada/header.php'), wp_head, do_action('wp_head'), WP_Hook->do_action, WP_Hook->apply_filters, AsgarosForumAppearance->set_header, AsgarosForumContent->get_first_post

Is this Avada related or Forum related?

Thank you..

Hello @burt

Do you have an exact link in the log available on which page this issue happened? That could help to debug this problem.

Edit: I could reproduce this error and just fixed it in the development-version. The bugfix will be included in the upcoming update. Thank you very much! 🙂

https://github.com/Asgaros/asgaros-forum/commit/5168f4dce2a277a7d63fbe9aac02770420669b58

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

I'm glad you could fix it because it was a sporadic error and I haven't seen it now since I mentioned it to you. In all honesty, my server database had issues in Nov/Dec, to the point that now my site has been migrate to a new server...

Thank you for fixing it. I really appreciate your work..

Burt

 

Hello @asgaros

Yesterday the error did show up again:

[28-Jan-2020 15:37:47 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY id ASC LIMIT 1' at line 1 for query SELECT * FROM forum_posts WHERE parent_id = ORDER BY id ASC LIMIT 1; made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/Avada/page.php'), get_header, locate_template, load_template, require_once('/themes/Avada/header.php'), wp_head, do_action('wp_head'), WP_Hook->do_action, WP_Hook->apply_filters, AsgarosForumAppearance->set_header, AsgarosForumContent->get_first_post

Beside the fact that the site now run on a different database, the error is the same.

I know that you said you fix it in the next version, but I was wondering what it is that trigger it... Not important, just if you feel to share...

Regards

Burt

EDIT:

I just read the fix and that answer my question... Disregard the above... sorry..

I went ahead and apply the commit...

Hello @burt

No problem! Mostly this issue occurs after deleting a topic which is still inside the index of a search-engine. In that case it tries to crawl it and then this error occurs. The same can happen when some users or bots just change the URL to a random-value which leads to non-existing contents.

This issue is not critical - thats why I didnt release an update yet. I want to include a few more bugfixes before I will publish it.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Thanks for your reply @asgaros

Completely understood and appreciated..

Burt