Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter power506

    (@power506)

    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.

    Thread Starter power506

    (@power506)

    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>

    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?

    Thread Starter power506

    (@power506)

    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.

    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?

    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.

    Thread Starter power506

    (@power506)

    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 4 years, 8 months ago by power506.
    • This reply was modified 4 years, 8 months ago by power506.

    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.

    Thread Starter power506

    (@power506)

    @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 4 years, 8 months ago by power506.

    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.

    Hi,
    I’ve encountered same problem. But I cannot locate the file: admin-ajax.php
    Would you please let me know where this file is?
    Thank you

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Tag Group Administration tags doesn’t load’ is closed to new replies.