Title: Fatal error in version 1.7.5.2.
Last modified: August 21, 2016

---

# Fatal error in version 1.7.5.2.

 *  [martin0w](https://wordpress.org/support/users/martin0w/)
 * (@martin0w)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-in-version-1752/)
 * After updating tho this version, the plugin causes the wp_insert_post to crash
   when WordPress is creating new posts.
 * This is because kkDataBase->getPostVoters attempts to run SQL even though there’s
   no post id (for content filter on a new post), causing syntax error in SQL:
 * Debug information:
 * [07-Feb-2014 17:14:28 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 wp_kklikeuser.date DESC’ at line 5 for query SELECT * FROM wp_kklikeuser
   
   LEFT JOIN (wp_users) ON (wp_users.ID = wp_kklikeuser.idwpuser) WHERE wp_kklikeuser.
   idlike = ORDER BY wp_kklikeuser.date DESC
 * made by
    wp_insert_post, wp_transition_post_status, do_action(‘new_to_publish’),
   call_user_func_array, nxs_snapPublishTo, nxs_doPublishToFB, apply_filters(‘the_content’),
   call_user_func_array, addKKLikeVoters, kkDataBase->getPostVoters
 * [https://wordpress.org/plugins/kk-i-like-it/](https://wordpress.org/plugins/kk-i-like-it/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [martin0w](https://wordpress.org/support/users/martin0w/)
 * (@martin0w)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-in-version-1752/#post-4589321)
 * Correction: not sure if the same bug weren’t present already in the preceing 
   versions of the plugin.
 *  Thread Starter [martin0w](https://wordpress.org/support/users/martin0w/)
 * (@martin0w)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-in-version-1752/#post-4589419)
 * A bit of further info on this issue.
 * The problem is not apparent in native WordPress. However, many plugins make use
   of do_action(‘new_to_publish’) or do_action(‘draft_to_publish’) in order to push
   new posts to social media etc. These hooks are fired from within wp_insert_post,
   causing the trouble.
 * In my case, I use NextScripts: Social Networks Auto-Poster which hooks to new_to_publish
   action hook to relay the content of the new post to facebook. It then renders
   the post content whereupon WordPress fires the_content action hook, engaging 
   KK I LIke it in the said manner.
 * While this is a conflict between different plugins, I believe that you should
   be checking for valid post id in your function(s), according to this suggestion:
 * public function getPostVoters($id){
 *  // Hack Martin 2014-02-07:
    if ( empty($id) ) { return 0; }
 * … etc.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fatal error in version 1.7.5.2.’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/kk-i-like-it_ededed.svg)
 * [KK I Like It](https://wordpress.org/plugins/kk-i-like-it/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kk-i-like-it/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kk-i-like-it/)
 * [Active Topics](https://wordpress.org/support/plugin/kk-i-like-it/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kk-i-like-it/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kk-i-like-it/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [martin0w](https://wordpress.org/support/users/martin0w/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-in-version-1752/#post-4589419)
 * Status: not resolved