Closed cpanti closed 9 months ago
Are you sure the code path that contains those actions is running? For example, try putting some other debugging output immediately before it such as a var_dump( $value)
followed by exit
.
Absolutely @johnbillion. I'm also using error_log to debug my code. I also added some error_log commands in QM plugin (exemple class QM_Timer - Start) and I see them.
Does this code fire directly within the current page load or does it happen inside an Ajax request?
it is a Ajax call. I'm calling an wordpress plugin endpoint.
jQuery.ajax({
url: endPointOrigin+"/wp-admin/admin-ajax.php?action=SurveyJS_GetSurveyJson",
type: "POST",
data: {
Id: mySurveyId,
cf_token: token,
href: window.location.href,
},
success: function(data) {
Timings and logs made in an AJAX call currently are not added to the QM panel.
Thank you John. Two questions:
Actually I'm not the owner of the plugin, just help out.
I don't think it's on the roadmap for the near future, but it has been mentioned before.
There are a few approaches you can take to initiate an AJAX call, the most modern probably being fetch()
.
Debugging requests outside of the current page load is definitely the to-do list, but no ETA just yet.
Nothing is logged under Timings or Logs. do_action function is called with qm/debug, qm/start and qm/stop. My error_log ($VH_ROOT/logs/$VH_NAME.error_log) doesn't show anything.
Anything else is working properly.
I don't know how to debug it. Webserver: litespeed Any idea where to start from? Thank you, Catalin