Support » Plugin: Tag Groups » Tag Group Administration tags doesn’t load

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Chris

    (@camthor)

    Hi @camthor thanks for the fast reply. That was helpful. It was indeed Ajax error.
    <?xml version='1.0' encoding='UTF-8' standalone='yes'?><wp_ajax><response action='tg_ajax_manage_groups_0'><object id='0' position='1'><response_data><![CDATA[success]]></response_data><supplemental><message><![CDATA[This is the regular Ajax response.]]></message></supplemental></object></response></wp_ajax>
    I will try now deactivate other plugins one by one.

    I failed to find plugin which causes this. Tried to turn them all off but nothing happens.

    This is error from console:

    [Tag Groups] error: 
    
    <?xml version='1.0' encoding='UTF-8' standalone='yes'?><wp_ajax><response action='tg_ajax_manage_groups_0'><object id='0' position='1'><response_data><![CDATA[success]]></response_data><supplemental><task><![CDATA[refresh]]></task><message><![CDATA[]]></message><nonce><![CDATA[6299ee68ee]]></nonce><start_position><![CDATA[1]]></start_position><groups><![CDATA[[{"id":1,"label":"igre","amount":0},{"id":2,"label":"Sample Group A","amount":0},{"id":3,"label":"Sample Group B","amount":0},{"id":4,"label":"Sample Group C","amount":0}]]]></groups><max_number><![CDATA[4]]></max_number></supplemental></object></response></wp_ajax>
    Plugin Author Chris

    (@camthor)

    Actually the response looks good.

    Which version of WordPress are you using? Do you use any non-standard settings on your site? (for example in wp-config.php) Or do you use any unusual server?

    I don’t have any non-standard settings or server. Only have Cloudfare setup with wp-admin bypass, which I now have turned off and, unfortunately, the problem still persists.

    Plugin Author Chris

    (@camthor)

    Cloudflare should not be a problem. I also use it on some sites.

    Other Ajax-powered functions like Quick Edit of posts and tags (in the list) work without problem?

    Which version of PHP are you using? Do you happen to know, which “default_charset” is set with PHP? Does the problem also appear when you try with a different browser?

    Plugin Author Chris

    (@camthor)

    PS: If you can edit files on your server you could try to locate the file …/plugins/tag-groups/assets/js/taggroups.js
    find the part

    
    error: function(xhr, textStatus, errorThrown) {
          console.log('[Tag Groups] error: ' + xhr.responseText);
        }
    

    and add more debugging info, for example:

    
    error: function(xhr, textStatus, errorThrown) {
          console.log(xhr);
          console.log(textStatus);
          console.log(errorThrown);
        }
    

    (And make sure that your browser loads the updated taggroups.js.)

    Maybe there’s some helpful information.

    Hi @camthor sorry for the late reply. I updated taggroups.js but I’m not sure what do I need to do now? In console I can see loaded taggroups.min.js file, but no non-min file.

    All quick actions work fine.

    Php is 7.2.15, the charset is UTF-8

    The problem still appears in Firefox. Hovewer, these are new console errors in that browser:

    XML Parsing Error: XML or text declaration not at start of entity
    Location: https://www.xyx.xy/wp-admin/admin-ajax.php?_fs_blog_admin=true
    Line Number 3, Column 1: admin-ajax.php:3:1
    XML Parsing Error: XML or text declaration not at start of entity
    Location: https://www.xyx.xy/wp-admin/edit.php?page=tag-groups_post
    Line Number 3, Column 1:
    • This reply was modified 1 month, 3 weeks ago by  power506.
    • This reply was modified 1 month, 3 weeks ago by  power506.
    Plugin Author Chris

    (@camthor)

    The non-minified JS file should be loaded when debug mode is enabled. Sorry, I forgot to mention that.

    The message “XML or text declaration not at start of entity” looks like a useful hint. There could be a hidden new line or whitespace at the beginning. When you copied the <?xml … part, have you noticed anything?

    I’m now not sure where to search the error. The plugin uses WordPress’ WP_Ajax_Response class to construct the response. You already tried with all other plugins disabled (and one of the default themes, I assume). I don’t know if .htaccess could possible include something that adds that hidden part to the beginning. Or, maybe you try again and set Cloudflare to Development Mode so that we can be sure that there was nothing in the cache.

    Yoast even created a page for that error:

    https://kb.yoast.com/kb/xml-sitemap-error/

    You could check the wp-config.php and the functions.php files, as described there.

    See also:

    https://stackoverflow.com/questions/32538074/xml-parsing-error-xml-or-text-declaration-not-at-start-of-entity-in-wordpress

    It’s possible that the quick actions use json and therefore it’s not affected.

    @camthor thank you so much, I solved it.

    There was an empty line before php opening tag in admin-ajax.php file.

    Last time that file was edited (not by me) is 27.8. I’m not sure, but I think that’s the time when I first installed your plugin. However, there was no change of that particular file later when I reinstalled it multiple times.

    Maybe that can help you somehow. Let me know if I can check anything for you. Anyway, thank you once again, we can mark this thread as solved 🙂

    • This reply was modified 1 month, 2 weeks ago by  power506.
    Plugin Author Chris

    (@camthor)

    Good to hear that!

    By the way, this plugin does not change any files (WP core or other code) – the plugin code is public so you can check yourself. No idea why admin-ajax.php had that additional line.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.