Okay
  Public Ticket #2200253
Write up on problems with plugin on WordPress site & salient theme
Closed

Comments

  • nskytland started the conversation

    We have a plugin that we’ve developed for auto-tagging content. It takes the text from a new post and sends it to an API that returns with tags. The plugin should apply tags when an article is published publically. The plugin for this purpose works on a variety of different WordPress and Database versions. 

    It doesn’t work on our one site that uses the Salient Theme.

     There seems to be some sort of conflict or bug when you publish publicly, which is what starts the tagging plugin to run. If I click publish on a completely new post, I see a white page with just this text:

    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 'FROM wp_terms AS t  INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id ' at line 1 for query SELECT   FROM wp_terms AS t  INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('post_tag') AND tr.object_id IN (121480) ORDER BY t.name ASC  made by edit_post, wp_update_post, wp_insert_post, wp_transition_post_status, do_action('publish_post'), WP_Hook->do_action, WP_Hook->apply_filters, AutoTag->tag_posts, wp_get_post_tags, wp_get_post_terms, wp_get_object_terms, get_terms, WP_Term_Query->query, WP_Term_Query->get_terms

     If I turn off the tagging plugin, everything posts fine. If I publish privately first and then publish publically, I don’t see the error message above but the saving does fail. I get a message that says the saving has failed and the spinner to indicate saving is ongoing never finishes. 

    If I open the chrome inspector console log, I see these console messages, which I have pasted below.

    (see console messages attachment) 

    The first line that occurs after I push the publish button is the 3rd from the top “Fetch finished loading”.

    When I go into the inspector a bit more, I can find the full URLs for those post calls that fail, which are:

    <main_url_of_site_HERE>wp-json/wp/v2/posts/121480?_locale=user

    And 

    < main_url_of_site_HERE >wp-admin/post.php?post=121480&action=edit&meta-box-loader=1&meta-box-loader-nonce=8308ab20b1&_locale=user

    My best guess is that there is something in the theme or something in the security that inter-plays with the theme that prevents the plugin from writing tags to the database or prevents writing to the database at the same time as the theme is publishing? 

    The PHP code in the plugin that might come into play is :

    (see attachments re: PHP code)

    Any help or suggestions that could be provided would be most appreciated. I would really like to get it deployed on center operations website before I offer it to others, but it really seems like it works on other WordPress sites with other themes fine, just not Salient.

  •  8,992
    Tahir replied

    Hey Again,

    Gonna escalate it to the developer so he may add in a response. 

    Could you allow us to log in to your website backend dashboard so we can check on this for you more?. We are gonna need the username and password of admin user as well as the login url.

    Thanks 


    ThemeNectar Support Team 

  •   nskytland replied privately
  •   nskytland replied privately
  •  8,992
    Tahir replied

    Unfortunately this is outside the scope of Theme Support so we cant go that route to help you with this. 

    The Error clearly mentions that there is an issue with the SQL Query written by the developer so that need to be fixed by the original developer. 

    All the Best . 


    ThemeNectar Support Team