query-monitor icon indicating copy to clipboard operation
query-monitor copied to clipboard

Missing feature : logging on Ajax Action

Open pentatonicfunk opened this issue 7 years ago • 5 comments

add_action( 'wp_ajax_someaction', 'someaction);

function someaction() {
   do_action( 'qm/warning', 'my warning');
}

looks like its not send the warning into Query Monitor

pentatonicfunk avatar Dec 14 '18 03:12 pentatonicfunk

might be really useful for plugin development, and slightly behave like firebug displaying logging messages.

pentatonicfunk avatar Dec 14 '18 03:12 pentatonicfunk

This is a great idea. I'll have a think about how I can get it to work.

johnbillion avatar Dec 21 '18 10:12 johnbillion

@johnbillion Was wondering if there might be an opportunity to store data (or rendered data) in a transient and add it's ID as an X-QM- header. In the browser, Query Monitor could hook into jQuery(document).ajaxComplete to check for this header and do something with this... Only had a quick look at the code, but the current organsiation would seem to allow that.

x2764tech avatar Jun 24 '20 11:06 x2764tech

Thanks yeah that's pretty much the exact route I'm planning on taking. #483 is required before I can move forward with this.

johnbillion avatar Jun 25 '20 13:06 johnbillion