Extends the Debug Bar plugin for the Sophi.io service

Last update: May 19, 2022

Debug Bar for Sophi.io

Extends the Debug Bar plugin for the Sophi.io service

Support Level Release Version WordPress tested up to version GPL-2.0-or-later License

Linting Dependency Review

Requirements

Installation

  1. Install Sophi.io.
  2. Install Debug Bar.
  3. Install the Debug Bar for Sophi plugin via the plugin installer, either by searching for it or uploading a ZIP file.
  4. Activate the plugin.

Usage

After installing and activating, click the Debug button in the admin toolbar. Within the Debug Bar Panel, click the Sophi panel.

Support Level

Active: The Globe and Mail is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.

Changelog

A complete listing of all notable changes to Debug Bar for Sophi are documented in CHANGELOG.md.

Contributing

Please read CODE_OF_CONDUCT.md for details on our code of conduct, CONTRIBUTING.md for details on the process for submitting pull requests to us, and CREDITS.md for a listing of maintainers, contributors, and libraries for Debug Bar for Sophi.

Like what you see?

Work with 10up, we create amazing websites and tools that make content management simple and fun using open source tools and platforms

GitHub

https://github.com/10up/sophi-debug-bar
Comments
  • 1. Add Sophi Site Automation API call logging

    Is your enhancement related to a problem? Please describe.

    When we make a call to the Sophi Site Automation API, it would be helpful to have the Debug Bar show:

    • API request
    • Sophi response (expected a list of Post IDs)
    • any success/failure messages associated with the request and response

    Ideally we can see this info in the editor as well as when viewing a post on the front-end.

    Designs

    No response

    Describe alternatives you've considered

    No response

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
    Reviewed by jeffpaul at 2022-05-12 17:59
  • 2. Add Panel

    Requirements

    The extension will display a warning "Sophi Debug Bar requires Sophi for WordPress version 1.0.14 or higher" if it finds main Sophi plugin version is lower. This may be ignored during the test, all functions work fine with the current develop, because the hooks already exist in it.

    Description of the Change

    This is a major/initial update for the Sophi Debug Bar.

    Debugging targets

    The extension watch for external requests performed by the main Sophi plugin:

    1. Requests within SiteAutomation context (including Auth)
    2. Tracking Events with Snowplow

    History

    Some of Sophi requests are performed before page reload (f.e. tracking events happen on the post update, then WordPress core reloads the page). That's why we need to keep requests history across different pageviews.

    The requests history is stored in a sophi_debug_history transient with attributes:

    • Max history size is 10 (override in sophi_debug_history_size filter)
    • Time to live is 3600 seconds (override in sophi_debug_history_ttl filter)

    Logging

    All requests are logged to WP_CONTENT_DIR/sophi-logs/sophi-YYYY-MM-DD.log files by day.

    Added setting to enable/disable log to the main Sophi plugin settings page. Default is "disable"

    TODO add a page to view logs in Dashboard.

    Debug Bar Panel

    Extension provides the panel for Debug Bar with the list of items in History

    image

    Checklist:

    • [x] I have read the CONTRIBUTING document.
    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    • [ ] I have added tests to cover my change.
    • [ ] All new and existing tests passed.

    Changelog Entry

    Credits

    Props @

    Reviewed by cadic at 2022-05-01 09:48
  • 3. fix build process

    Describe the bug

    dotorg deploy action needs to be updated as does the gitattributes to ensure the proper directories/files are included in the built version published on github & dotorg

    Steps to Reproduce

    compare https://wordpress.org/plugins/debug-bar-for-sophi/ with what's built in the archive from source

    Screenshots, screen recording, code snippet

    No response

    Environment information

    No response

    WordPress information

    No response

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
    Reviewed by jeffpaul at 2022-05-11 13:11
  • 4. Debug Bar JS SyntaxError

    Describe the bug

    The JavaScript panel for Debug Bar currently shows a SyntaxError on a dist JS file in the debug bar plugin, would be good to see if that's something we can easily resolve?

    Steps to Reproduce

    1. Enable Debug Bar
    2. Click on Debug in adminbar
    3. Click on JavaScript panel
    4. See SyntaxError (screenshot below)

    Screenshots, screen recording, code snippet

    Screen Shot 2022-05-17 at 1 29 53 PM

    Environment information

    PHP 7.4.29, MySQL 5.5.5, Sophi 1.1.1-dev, Debug Bar 1.1.3, Debug Bar for Sophi 0.1.0, WordPress 5.9.3

    WordPress information

    No response

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
    Reviewed by jeffpaul at 2022-05-17 18:33
  • 5. Sophi Debug records overflow horizontally

    Describe the bug

    Viewing the Sophi panel for Debug Bar causes some of the request/response data to overflow horizontally and cause heavy side scrolling to try and read all the data. Perhaps we should stack the Response data below the Request data instead of side-by-side?

    Steps to Reproduce

    1. Click Debug in adminbar
    2. Click Sophi
    3. See Sophi Auth request/response rows with lots of content

    Screenshots, screen recording, code snippet

    Primary page load Screen Shot 2022-05-17 at 1 35 02 PM

    Scrolling horizontally to see additional content Screen Shot 2022-05-17 at 1 35 14 PM

    Environment information

    PHP 7.4.29, MySQL 5.5.5, Sophi 1.1.1-dev, Debug Bar 1.1.3, Debug Bar for Sophi 0.1.0, WordPress 5.9.3

    WordPress information

    No response

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
    Reviewed by jeffpaul at 2022-05-17 18:37
  • 6. Debug log setting updates

    Describe the bug

    Unchecking the "Enable debug log" setting still appears to show the Sophi Logs submenu under Tools as well as the link toView Logs`.

    Steps to Reproduce

    I think the changes here could be:

    • [x] update copy for the setting from Debug log and Enable debug log to perhaps Debug logging and Display verbose logging output from Sophi Authentication, Sophi API requests, and CMS publishing events?
    • [ ] move the View Logs link to after the setting toggle, perhaps as Display verbose logging output from Sophi Authentication, Sophi API requests, and CMS publishing events (view logs)? <-- perhaps only show the link when setting is active?
    • [x] Tools > Sophi Logs should only be available when the debug setting is active
    • [x] update Tools submenu and page name from Sophi Logs to Sophi.io Logs

    Screenshots, screen recording, code snippet

    No response

    Environment information

    No response

    WordPress information

    No response

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
    Reviewed by jeffpaul at 2022-05-17 18:24
  • 7. Unexpected output

    Describe the bug

    When the Debug Bar for Sophi is active, saving a post will display JSON error.

    Looks like the Snowplow in debug mode is trying to write their own logs.

    Steps to Reproduce

    1. Activate Debug Bar for Sophie
    2. Protect filesystem from write
    3. Create new post or edit existing
    4. Click "Update" button
    5. The JSON error will appear (while the post is saved)

    Screenshots, screen recording, code snippet

    image

    Output from REST API save post request (removed sensitive info):

    Unable to create debug log files: invalid write permissions.Payload sent successfully Payload: [
        {
            "dtm": "1652348152000",
            "e": "ue",
            "ue_pr": "<...>",
            "co": "<...>",
            "tv": "php-0.5.0",
            "tna": "sophiTag",
            "aid": "<...>.dev:cms",
            "p": "srv",
            "eid": "2c6efd23-<...>"
        }
    ]
    

    Environment information

    No response

    WordPress information

    No response

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
    Reviewed by cadic at 2022-05-12 09:41
  • 8. Update/docs

    Description of the Change

    This PR updates the docs to note VIP will already include the Debug Bar plugin, updates the plugin name and description, and tidies up some specifics in the composer and package files. Note that many references in this PR and elsewhere in the plugin assume the final repo destination of https://github.com/globeandmail/sophi-debug-bar as we will soon be moving the repo there.

    Alternate Designs

    n/a

    Possible Drawbacks

    Verification Process

    Utilize a plaintext file viewer or markdown viewer for the main file changes.

    Checklist:

    • [x] I have read the CONTRIBUTING document.
    • [ ] My code follows the code style of this project.
    • [x] My change requires a change to the documentation.
    • [x] I have updated the documentation accordingly.
    • [ ] I have added tests to cover my change.
    • [ ] All new and existing tests passed.

    Changelog Entry

    Added - Documentation updates.

    Credits

    Props @jeffpaul.

    Reviewed by jeffpaul at 2022-05-11 14:05
  • 9. Add/community files

    Description of the Change

    Adds default community files to the repo.

    Alternate Designs

    n/a

    Possible Drawbacks

    none identified

    Verification Process

    Most are previewable with a markdown viewer.

    Checklist:

    • [x] I have read the CONTRIBUTING document.
    • [x] My code follows the code style of this project.
    • [x] My change requires a change to the documentation.
    • [x] I have updated the documentation accordingly.
    • [ ] I have added tests to cover my change.
    • [ ] All new and existing tests passed.

    Changelog Entry

    Added - Documentation and GitHub Actions.

    Credits

    Props @jeffpaul.

    Reviewed by jeffpaul at 2022-05-02 14:09
  • 10. Fix linting workflow trigger list

    Description of the Change

    After upgrading 10up-toolkit to 4.0.0 in #31 some new rules were applied to stylelint, which is now causing linting errors in new PRs (#27, #32, #33).

    In #31 actions, the linting job was skipped because no source files were changed.

    This PR adds more sensitive files to the trigger list:

    • package.json and lockfile
    • eslint config
    • phpcs config

    It will force linting job to run when the config changes even if no source files were changed (like it happened in #31)

    Verification Process

    • At https://github.com/10up/sophi-debug-bar/pull/34/commits/2e932fe1454b95e570aeead129d9f52a52098ef5 lint job executes with failure if package-lock.json changed, no source files
    • At https://github.com/10up/sophi-debug-bar/pull/34/commits/7c9b674829cf1263e636fb3401eeb40fa02ac55a lint job succeeds after SCSS fix applied

    Related issues/PRs

    After this is merged, perform merge develop into #27, #32 and #33 to resolve GitHub Actions failure.

    Reviewed by cadic at 2022-05-19 13:29
  • 11. Settings page updates

    Description of the Change

    • [x] Settings section changed to "Debug Bar Settings"
    • [x] "Enable Logging" checkbox name and label are updated
    • [x] "View logs" link only visible when logs are enabled AND logs directory is writable
    • [x] Link to logs in Tools menu only visible when logs are enabled
    • [x] Tools menu link and page name include "Sophi.io"
    • [x] Fixed missing textdomain in Logs page title

    Closes #18 Closes #19

    Alternate Designs

    Possible Drawbacks

    Verification Process

    Checklist:

    • [ ] I have read the CONTRIBUTING document.
    • [ ] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    • [ ] I have added tests to cover my change.
    • [ ] All new and existing tests passed.

    Changelog Entry

    Tweak - Settings page updates Fix - missing text domain for "Sophi.io Logs" page title

    Credits

    Props @cadic

    Reviewed by cadic at 2022-05-19 07:30
  • 12. Discrepancy between WP.org and GH ZIP directories

    Describe the bug

    Downloading a release asset from GH and a similar ZIP from WP.org shows slightly different directory names. Some concern here that if someone downloads from GH and then later goes to update things may get wonky in their WP site directories.

    Steps to Reproduce

    Probably best to have the GH directory update to debug-bar-for-sophi to match the WP.org slug, not sure if there's a way to build that into the release/deploy action/workflows or just easier to change the repo name to match perhaps?

    Screenshots, screen recording, code snippet

    No response

    Environment information

    No response

    WordPress information

    No response

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
    Reviewed by jeffpaul at 2022-05-18 14:20
Laravel Debugbar (Integrates PHP Debug Bar)
Laravel Debugbar (Integrates PHP Debug Bar)

Laravel Debugbar This is a package to integrate PHP Debug Bar with Laravel. It includes a ServiceProvider to register the debugbar and attach it to th

May 24, 2022
Slim Framework Tracy Debugger Bar
 Slim Framework Tracy Debugger Bar

Slim Framework Tracy Debugger Bar configure it by mouse now in package: Panel Description Slim Framework - Slim Environment RAW data Slim Container RA

Feb 26, 2022
PHP Debug Console
PHP Debug Console

PHP Console A web console to try your PHP code into Creating a test file or using php's interactive mode can be a bit cumbersome to try random php sni

May 14, 2022
Php Debugger to run in terminal to debug your code easily.
Php Debugger to run in terminal to debug your code easily.

What is Dephpugger? Dephpugger (read depugger) is an open source lib to make a debug in php direct in terminal, without necessary configure an IDE. Th

Jan 12, 2022
An elegant debug assistant for the Laravel framework.
An elegant debug assistant for the Laravel framework.

Introduction Laravel Telescope is an elegant debug assistant for the Laravel framework. Telescope provides insight into the requests coming into your

May 19, 2022
Ray server is a beautiful, lightweight php app build on Laravel that helps you debug your app. It runs without installation on multiple platforms.
Ray server is a beautiful, lightweight php app build on Laravel that helps you debug your app. It runs without installation on multiple platforms.

RayServer is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app. It runs without installation on multiple platforms.

May 16, 2022
Php Debugger to run in terminal to debug your code easily.
Php Debugger to run in terminal to debug your code easily.

What is Dephpugger? Dephpugger (read depugger) is an open source library that allows a developer to debug in php direct in terminal, without necessary

May 20, 2022
A simple Craft module, inspired by Mildly Geeky's "Kint", to debug Twig within your browser
A simple Craft module, inspired by Mildly Geeky's

A simple Craft module, inspired by Mildly Geeky's "Kint", to debug Twig within your browser

Feb 2, 2022
Extends the Debug Bar plugin for the Sophi.io Site Automation service.
Extends the Debug Bar plugin for the Sophi.io Site Automation service.

Debug Bar for Sophi Extends the Debug Bar plugin for the Sophi.io Site Automation service. Requirements PHP 7.4+ WordPress 5.6+ Sophi 1.1.0+ Debug Bar

May 19, 2022
Debug bar for PHP
Debug bar for PHP

PHP Debug Bar Displays a debug bar in the browser with information from php. No more var_dump() in your code! Features: Generic debug bar Easy to inte

May 26, 2022
Laravel Debugbar (Integrates PHP Debug Bar)
Laravel Debugbar (Integrates PHP Debug Bar)

Laravel Debugbar This is a package to integrate PHP Debug Bar with Laravel. It includes a ServiceProvider to register the debugbar and attach it to th

May 24, 2022
Laravel Debugbar (Integrates PHP Debug Bar)
Laravel Debugbar (Integrates PHP Debug Bar)

Laravel Debugbar This is a package to integrate PHP Debug Bar with Laravel. It includes a ServiceProvider to register the debugbar and attach it to th

May 21, 2022
Debug - The Debug component provides tools to ease debugging PHP code.

Debug Component CAUTION: this component is deprecated since Symfony 4.4. Instead, use the ErrorHandler component. The Debug component provides tools t

May 25, 2022
This package extends the core file generators that are included with Laravel 5
This package extends the core file generators that are included with Laravel 5

Extended Migration Generators for Laravel 6, 7 and 8 Easily define the migration schema right in your make:migration command. The new commands this pa

May 17, 2022
This package extends Laravel's FormBuilder to include some (soon all) HTML5 elements

HTML5 Forms for Laravel This package extends Laravel's FormBuilder to include some (soon all) HTML5 elements. How to Install Install the braunson/lara

Aug 27, 2020
Extends the customer functionality of Magento.
Extends the customer functionality of Magento.

FireGento_Customer This extension extends the core functionality of the customer module of Magento. It is possible to temporarily lock the user accoun

Apr 1, 2022
Extends Yii Menu widget

Extends Yii Menu widget. This widget offers a scrollspy and affixed enhanced navigation (upto 2-levels) to highlight sections and secondary sections in each page.

Mar 12, 2022
❓ A WordPress plugin to display your site's environment type in the admin bar

Where A WordPress plugin to display your site's environment type in the admin bar. Available Filters where_env_should_add_env_type - Defaults to true

Mar 29, 2022
Hook-logger-plugin - Debug WordPress action / filter hooks.

hook-logger-plugin Easily debug WordPress action / filter hooks, finding where actions are called from and understanding the flow of execution. This p

Feb 5, 2022
Envbar allows you to differentiate between environments by adding a custom colored bar above the top navigation.
Envbar allows you to differentiate between environments by adding a custom colored bar above the top navigation.

Envbar Envbar allows you to differentiate between environments by adding a custom colored bar above the top navigation. This should help backend users

Apr 10, 2022