Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't write trace summary report when... #78

Open
bobbingwide opened this issue Jul 2, 2019 · 6 comments
Open

Don't write trace summary report when... #78

bobbingwide opened this issue Jul 2, 2019 · 6 comments
Assignees
Labels

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jul 2, 2019

I've come across more instances where the trace summary report is written to output which is being written to a file. In some cases the output affects further processing.

Action Subsequent Problem?
WooCommerce Product Export Yes. Dummy products imported.
Advanced Gutenberg Contact form export ?
Advanced Gutenberg Newsletter export ?
Exporting Gravity Forms Cannot import
edd-api=products request Downloads block doesn't complete.

See also #20, #48, #75, #77, #100

@bobbingwide bobbingwide self-assigned this Jul 2, 2019
@bobbingwide bobbingwide added the bug label Jul 2, 2019
@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 2, 2019

For the WooCommerce Product Export the request was

/wp-admin/edit.php?post_type=product&page=product_exporter&nonce=0166f6ed59&action=download_product_csv&filename=wc-product-export-2-7-2019-1562056736301.csv

We can detect the action as being download_product_csv in bw_trace_ok_to_echo().

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 3, 2019

For Advanced Gutenberg Contact form export the $_REQUEST contains

   [page] => advgb_main
    [advgb_export_data_nonce_field] => ae92b12056
    [_wp_http_referer] => /wp-admin/admin.php?page=advgb_main
    [block_data_export] => contact_form.csv

For the Newsletter it's

 [page] => advgb_main
    [advgb_export_data_nonce_field] => f6daaba145
    [_wp_http_referer] => /wp-admin/admin.php?page=advgb_main
    [block_data_export] => newsletter.json

@bobbingwide
Copy link
Owner Author

The current solution for oik-bwtrace is not easily extended by users who discover other cases where bw_trace_ok_to_echo() currently thinks it's OK to echo.

In the future, I may want to make this a user configurable field.
... But it's only really necessary when someone is tracking down an issue using tracing and where tracing is getting in the way of solving the problem.

@bobbingwide
Copy link
Owner Author

Re-opening: trace summary report should not be written for ACF fields export.

@bobbingwide bobbingwide reopened this Mar 24, 2022
@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 9, 2022

Trace summary export should not be written for Export Divi Customizer settings.
This is a request to wp-admin with the following query parameters.

_REQUEST Array

[et_core_portability] => (string) "1"
[context] => (string) "et_divi_mods"
[name] => (string) "Divi%20Customizer%20Settings"
[nonce] => (string) "eb93443b1a"
[timestamp] => (string) "1273257722307800"

@bobbingwide
Copy link
Owner Author

I've come across more situations where producing the trace output report causes problems in the browser.
The most common is when the browser expects a particular content type such as JSON or XML and can't handle the HTML comments. It should be possible to generically detect a Content-Type header record being sent with the value being something which isn't text/html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant