Skip to content

Help tabs broken & lots of scripts missing #1

@jrfnl

Description

@jrfnl

Hiya,

I love the idea of this plugin. Unfortunately it's not working as advertised if used on the WordPress back-end.

Issue 1:

If this plugin is activated the help tab functionality in the back-end of WordPress breaks.
You can open the help tab and the first section will display, but if you click on any of the other sections, the help text will not change.
Some other functionality might also break, depending on which plugins are installed.

Issue 2 (very likely related):

The plugin calls the $wp_scripts->do_items() method which actually causes the script queue to be printed. That can't be the intention. Those scripts are not meant to be printed at that point of generating the html page.
Have a look at the page source code of any back-end page to see what I mean, you will see script tags in your table.

Issue 3:

Any scripts which are queued to be loaded in the footer are not included in the output.
Have a look at the 'New post' page for example. You will see lots of scripts (and some stylesheets) at the bottom of the html source. These are not listed on the debug bar scripts/styles panel.

I thought I'd debug and send you a pull request, unfortunately the problems are larger than I expected and I don't have time at this moment to dive in too deeply.

My current line of thinking on how to actually get this to work properly is something along the lines of the following:

  • at tab rendering, just render a nearly empty page
  • hook into the enqueue function to register which scripts are being queued (or maybe hook into the do_items function ?) or any logical other place where you can find the scripts being requested. I'm not sure which hook are available for this, needs some research.
  • save the result to a transient
  • request the transient via ajax when the script/styles panel of the debug bar is requested.

Not sure if this is actually the way to go, but something surely needs to be changed.

Hope this helps and please let me know if you need more information.

Smile,
Juliette

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions