WordPress.org

Ready to get started?Download WordPress

Forums

Debug Objects
[resolved] Bug Report: Ajax not working when Debug_Objects_Theme activated (2 posts)

  1. neyl
    Member
    Posted 1 year ago #

    Ajax not working when Theme information is selected. This is because of line 40 in class-theme.php
    add_action( 'shutdown', array( $this, 'get_list_ids' ) );
    which calls get_list_ids() #182. and

    <script>
    				var els = [];
    				jQuery( '[id]' ).each( function () {
    					els.push( this.id );
    				} );
    				els.sort();
    				var ids = '#' + els.join( '<br />#' );
    				jQuery( '#register_ids' ).html( ids );
    			</script>
    gets added to ajax response which breaks ajax jquery code which is waiting for valid JSON response. Please advise me if there is a way to write jquery ajax code that will not break when markup is added to response or if the plugin is responsible?
    Anyway thanks for great plugin that rocks!!!

    http://wordpress.org/extend/plugins/debug-objects/

  2. Frank
    Member
    Plugin Author

    Posted 1 year ago #

    I think that the problem is, that jquery on this point not loaded; to early for my small script. I will change this and include the script via wp_enqueue_script() and then it is easier to control, that jquery is loaded. I add this to my issue list on the repo: https://github.com/bueltge/Debug-Objects/issues/9

    Thanks for the hint. You can also use the current version of the github repo, is with more features, but not ready for a stable release on wp.org.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.