WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.18k forks source link

Widgets editor - Classic Widgets screen doesn't display when Classic Editor plugin is activated #25552

Open maddisondesigns opened 4 years ago

maddisondesigns commented 4 years ago

Describe the bug When a site is using the Classic Editor, the new Block Based Widget editor still displays. If someone is using the classic Editor, they obviously don't want to use Gutenberg, so the classic Widgets screen should still be accessible

Vid: https://share.getcloudapp.com/lluYBpq7

To reproduce Steps to reproduce the behavior:

  1. Activate the Classic Editor plugin
  2. In Settings > Writing set the Editor to Classic Editor
  3. Go to the Appearance > Widgets screen
  4. New block based widgets screen still appears instead of classic widgets screen

Expected behavior If a site is using the Classic Editor plugin, the classic widgets screen should still display, not the new Gutenberg editor widgets screen.

Editor version (please complete the following information):

Desktop (please complete the following information):

StevenDufresne commented 4 years ago

Pinging @azaozz for expertise.

Is this the right place for this ticket?

maddisondesigns commented 4 years ago

I don't know whether this is an issue with the Classic Editor plugin, or an issue with Gutenberg not working properly, but happy to raise it as an issue over on the Classic Editor Github repo, if that's the preferred location for this one. Just let me know.

maddisondesigns commented 4 years ago

Can we please get an update on this one. With the new Widgets screen set to be released with the WP5.6 at the end of the year, it's imperative that this is addressed and fixed before that occurs. Do I need to raise it as an issue over on the Classic Editor Github repo, or is it a Gutenberg issue that needs to be resolved here?

azaozz commented 4 years ago

If a site is using the Classic Editor plugin, the classic widgets screen should still display...

Perhaps, but only as a temp back-compat imho :)

Is this the right place for this ticket?

Think no. It is likely that some plugins that extend the "classic widgets screen" will not be updated to support the new tech used there. For that purpose, as a temporary measure, it makes sense to be able to revert to the "old tech". This is/should be a part of the Classic Editor plugin, has no place in core.

Please see: https://github.com/WordPress/classic-editor/pull/144, and if possible test it.

maddisondesigns commented 4 years ago

@azaozz Have just tested this fix and it doesn't work, unfortunately. The new Widgets screen still displays. Do you want me to leave a comment on that PR?

maddisondesigns commented 4 years ago

Is it possible to please reopen this, and keep it open, until there's a working solution in place. At the moment, this Classic Editor PR doesn't work and I'm very concerned that WP 5.6 is going to roll out without a working fix in place for this issue. Whilst the end fix for this issue might be resolved with changes to the Classic Editor, as opposed to Gutenberg itself, I'm concerned that now that this issue has been closed here, it's going to be swept to the side, instead of being in place when the new Widgets screen rolls out.

maddisondesigns commented 4 years ago

@azaozz @StevenDufresne Can this issue please be reopened as the Classic Editor PR mentioned above, has now been closed without being merged, which means this issue still exists and there's no current PR or fix in place to rectify it yet.

StevenDufresne commented 4 years ago

@maddisondesigns I'm personally not the best to shepherd this issue, but I don't see why it can't be reopened.

maddisondesigns commented 4 years ago

@StevenDufresne That's no worries. I simply tagged you as I was hoping that you'd have access to reopen it for me. I left a comment last week, asking for it to be reopened, but no-one responded. I appreciate you opening it for me now though. Thanks for that 👍

maddisondesigns commented 3 years ago

The Classic Widgets screen still doesn't display when the Classic Editor is used, with Gutenberg 9.9.2

skorasaurus commented 3 years ago

Hi @maddisondesigns ;

I am able to reproduce the issue using the steps in your first post on a vanilla testing installation of wordpress 5.6.2.

Although we are primarily using Gutenberg for most content editing, our organization hasn't yet migrated to block-based widgets; and some of our post_types don't work with the block editor yet, so we also have classic-editor and gutenberg-ramp also installed.

In summary, what I did to successfully load the "classic" widget editor instead of the block-based one was use the following filter in my theme: add_filter( 'gutenberg_use_widgets_block_editor', '__return_false', 100 ) (note that this behavior works but it's not the recommended way to do this , see https://github.com/WordPress/gutenberg/issues/25123)

I too, think its reasonable to expect that that the block-based widget editor would be disabled when the classic-editor plugin is activated.

Since there's no 'official' or recommended best practice of how to disable block-based editing for widgets, perhaps we should leave this open?

maddisondesigns commented 3 years ago

@skorasaurus If you could leave this one open, it would be appreciated. Thanks. Even if it's just a one line filter to revert back to the original widgets page, it definitely should be included either automatically in core or in the the Classic Editor plugin. If someone wants to use the Classic Editor instead of Gutenberg, then it makes sense that they're not going to want to use Gutenberg on the Widgets screen either.

pagelab commented 3 years ago

As stated in the Block Editor Handbook there's now official options to bring back the classic Widgets screen:

function example_theme_support() {
    remove_theme_support( 'widgets-block-editor' );
}
add_action( 'after_setup_theme', 'example_theme_support' );

and

add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' );
add_filter( 'wp_use_widgets_block_editor', '__return_false' );

There's also the Classic Widgets plugin, which is quite simple and just uses the two filters above.

Azragh commented 3 years ago

@pagelab I Just recognized that the link to Classic Widgets (provided in the little tutorial pop-up on widgets screen) points to the Classic Editor plugin page.