V Archives - [oik] plugins.com https://www.oik-plugins.com/letters/v/ WordPress plugins and themes Tue, 01 Dec 2020 16:26:31 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 Viewing REST request trace files https://www.oik-plugins.com/wordpress-plugins-from-oik-plugins/free-oik-plugins/oik-trace-plugin/viewing-trace-files/viewing-rest-request-trace-files/ Tue, 10 Dec 2019 12:34:01 +0000 https://s.b/oikcom/?page_id=34985

REST request trace files are created for requests where the request URI appears to be that used for REST requests. Since tracing is started before WordPress has determined that it's processing a REST_REQUEST, oik-bwtrace checks for /wp-json/wp/v2 or /index.php?rest_route= in the $_SERVER['REQUEST_URI'].

At the end of REST processing, the filter rest_pre_echo_response allows us to see what's being returned to the client. It traces $HTTP_RAW_POST_DATA and the 3 parameters passed to the filter result, server and request.

Example REST request trace output
]]>
Viewing trace files https://www.oik-plugins.com/wordpress-plugins-from-oik-plugins/free-oik-plugins/oik-trace-plugin/viewing-trace-files/ Thu, 05 Dec 2019 19:02:33 +0000 https://s.b/oikcom/?page_id=34959

When the trace files directory is accessible though your web server you may be able to use your browser to view the trace files and daily trace summary files. If you can't use the browser, then you will have to view them from the back end.

Viewing files with the browser

Viewing trace files in the browser

  1. Open your browser

    You may want to open a new tab or window, or use a different browser.

  2. Navigate to the trace files directory

    e.g. https://s.b/wordpress/bwtrace

    If you see the WordPress Not Found ( 404 ) page then this implies the folder's permissions do not allow access.

    If .htaccess authentication has been implemented you will need to enter your username and password before you see the directory listing.

  3. Choose the file to view

    Select a file to view and click on it. If you don't know which file to view pick the daily trace summary file.

  4. Browse the Daily Trace Summary file

    View the daily trace summary file to see which transactions have been run and find the trace file name for the transaction you're interested in.

  5. Browse the trace file

    Use your browser's find function to help locate the trace record's you're interested in.

Notes

  • The web server will need to be configured to allow directory listings.
  • If the folder is protected with the appropriate .htaccess and .htpasswd files then only valid users will be able to see the files.

See also

[bw_tree]

Viewing files in the back end

When the trace files directory is not accessible from the browser then you have to view the trace files from the backend.

In a local development environment you can use your file manager. e.g. Explorer.

If they're on a Linux server then you will either need to ftp the files or ssh to the server and browse them there.

Summary of viable access methods

Protecting your trace files directory

On a staging or live server the trace files directory can be protected using Htaccess Authorisation.

]]>
Virtual field type https://www.oik-plugins.com/wordpress-plugins-from-oik-plugins/free-oik-plugins/oik-fields-custom-fields-plugin/oik-fields-field-types/oik-fields-virtual-field/ Thu, 31 Jul 2014 16:11:36 +0000 http://www.oik-plugins.com/?page_id=14181 Virtual field type to define a virtual field.]]>