gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

No way to drag metabox back into sidebar / below content if there are no other metaboxes there

Open ZebulanStanphill opened this issue 7 years ago • 40 comments

The issue

If there is a metabox in the sidebar area, you can drag it into the larger area below the content area. However, once you have dragged metaboxes out of the sidebar, there is no way to drag any of them back into the sidebar unless you move them back from the Classic Editor interface. The same applies to moving all the metaboxes out of the area below the main content of the post.

Still an issue in Gutenberg 7.2.0.

ZebulanStanphill avatar Jul 13 '18 18:07 ZebulanStanphill

Confirm that this is still an issue in 3.5.0

xenobytezero avatar Aug 10 '18 00:08 xenobytezero

This is still an issue in master. Could this get the bug label?

ZebulanStanphill avatar Oct 18 '18 18:10 ZebulanStanphill

Still an issue in 4.1.0.

xenobytezero avatar Oct 25 '18 01:10 xenobytezero

@ZebulanStanphill Can you provide some instructions for those who want to easily replicate this? Like a plugin or something to use for rendering the problematic meta boxes?

earnjam avatar Nov 02 '18 01:11 earnjam

@earnjam I would say the Yoast SEO plugin is a common example and simple to try out. It doesn't really matter what plugin you use, because the bug affects all metaboxes.

Basically, if there are no metaboxes in the sidebar, you can not move any metaboxes from the area below the post content over to the sidebar. Vice-versa, if there are no metaboxes in the area below the post content, you can not move any metaboxes from the sidebar into that area. The drop zone essentially is unreachable unless there is already a metabox there.

ZebulanStanphill avatar Nov 02 '18 01:11 ZebulanStanphill

Ok, I see what you're saying. I used Yoast SEO and Exclude Pages from Menu so that I'd have one in each spot.

I moved the Exclude Pages meta box out of the sidebar and to the bottom area. After that, dragging either meta box to the right just keeps growing the content area, never allowing you to get outside of it and onto the sidebar. It's the same in the other direction, except it grows the sidebar space downward while dragging.

Basically there is no dropzone unless there is an existing metabox in the space.

I kinda wonder if they should even be movable from the sidebar/bottom at all. Like maybe just allow reordering in place, but not dragging between them.

earnjam avatar Nov 02 '18 01:11 earnjam

I would say that I definitely prefer to be able to have all on the sidebar or a mix. As far as I can tell, everything defaults to the bottom, so only allowing re-ordering might not work in this case.

xenobytezero avatar Nov 02 '18 01:11 xenobytezero

Still an issue in 5.1.1

danbru1989 avatar Apr 25 '19 18:04 danbru1989

Is there a workaround for this?

avdi avatar Feb 25 '20 05:02 avdi

@avdi You can create a new post/page using the classic editor, move metaboxes to the bottom or side, save the dummy post/page, and then next time you use the block editor, the metaboxes will be in the corresponding locations. Or at least, that's how it worked last time I tried several months ago.

ZebulanStanphill avatar Feb 25 '20 14:02 ZebulanStanphill

save the dummy post/page

Saving isn't necessary. The meta box' placement is done via AJAX, independent of post-saving actions.

sybrew avatar Feb 27 '20 00:02 sybrew

If your metabox was a the bottom to begin with you can reset your metabox layout like so: https://wordpress.stackexchange.com/questions/38646/reset-positions-of-metaboxes-in-admin

So yes, this is still an issue with WP 5.5. in mid 2020.

eliasbutting avatar Aug 24 '20 14:08 eliasbutting

Issue was reported by a user in the German support forums for WordPress 5.5.1, too.

pixolin avatar Sep 04 '20 13:09 pixolin

This behavior is leading to a very confusing user experience, as you can move the metaboxes around as long as there was a metabox in each position (bottom and sidebar) when you loaded the page. As soon as you move all the metaboxes to a single position and then refresh the page, you can no longer move them to the other position.

metabox_funny_blockeditor

I've found a few workarounds for this problem;

  • Enable a new metabox that defaults to the position where you currently don't have any metabox active.
  • Start a new website and forget about your current one.
  • Modify the admin-ajax request to force a move to a new position.

tacoverdo avatar Sep 04 '20 14:09 tacoverdo

For those who is looking for a quick solution(like me):

DELETE FROM `wp_usermeta`
WHERE  `user_id` = YOU_USER_ID 
AND  `meta_key` =  'meta-box-order_post'

This query will reset your meta box view and you can play with it again.

mxnr avatar Nov 22 '20 23:11 mxnr

Does anyone know in which version the fix will be implemented? The issue seems to persist in WP 5.6 and we have this problem a lot with all our users in the multisite.

Does anyone know in which version the fix will be implemented? The issue seems to persist in WP 5.6 and we have this problem a lot with all our users in the multisite.

There's a PR awaiting review in https://github.com/WordPress/gutenberg/pull/25187 so as soon as that one gets merged this should no longer be an issue.

aristath avatar Jan 08 '21 10:01 aristath

While I appreciate there are a lot of things to work on, improve, implement, fix, etc... I wanted to weigh in and give my desire to have this resolved.

Users of the plugin LifterLMS (which I maintain) report this as a bug in LifterLMS regularly enough that we've decided to make a video explaining how to "fix" this (as a canned response).

It's happening a lot and I can't explain it.

thomasplevy avatar Feb 12 '21 20:02 thomasplevy

Please head on over and give additional feedback on the PR. https://github.com/WordPress/gutenberg/pull/25187 Thanks!

paaljoachim avatar Feb 20 '21 23:02 paaljoachim

Hi, no solution in version 5.7.2 ??

Guihom35 avatar Jun 04 '21 20:06 Guihom35

For those who is looking for a quick solution(like me):

DELETE FROM `wp_usermeta`
WHERE  `user_id` = YOU_USER_ID 
AND  `meta_key` =  'meta-box-order_post'

This query will reset your meta box view and you can play with it again.

The same query via wp-cli

wp user meta delete <user_id> meta-box-order_post

AltanS avatar Jul 12 '21 12:07 AltanS

For those who is looking for a quick solution(like me):

DELETE FROM `wp_usermeta`
WHERE  `user_id` = YOU_USER_ID 
AND  `meta_key` =  'meta-box-order_post'

This query will reset your meta box view and you can play with it again.

The same query via wp-cli

wp user meta delete <user_id> meta-box-order_post

Or simply:

delete_user_meta( $user_id, 'meta-box-order_post' );

mfs-mc avatar Jul 12 '21 13:07 mfs-mc

For those who is looking for a quick solution(like me):

DELETE FROM `wp_usermeta`
WHERE  `user_id` = YOU_USER_ID 
AND  `meta_key` =  'meta-box-order_post'

This query will reset your meta box view and you can play with it again.

The same query via wp-cli

wp user meta delete <user_id> meta-box-order_post

I'd just like to add that if you're having this problem in a custom post type, you will have to change the meta-key accordingly. So for the post type download the command will have to be

wp user meta delete <user_id> meta-box-order_download

davidmondok avatar Sep 10 '21 11:09 davidmondok

Passing on the love from my support team who's asking me how I can fix this because our users are still doing this fairly regularly.

thomasplevy avatar Oct 22 '21 22:10 thomasplevy

Hey Thomas @thomasplevy

I am hoping that @ribaricplusplus might be able to help out with the stalled PR: https://github.com/WordPress/gutenberg/pull/25187#issuecomment-950226769

paaljoachim avatar Oct 23 '21 22:10 paaljoachim

The PR on #25187 was merged, reopening this issue as per the comment on https://github.com/WordPress/gutenberg/pull/25187#issuecomment-950878704 👍

aristath avatar Oct 25 '21 12:10 aristath

Just to summarize, you can now move meta boxes between locations using the arrows on meta boxes. We're leaving this issue opened until we also get drag and drop working. Also keep in mind that the sidebar has to be visible #35923

For anyone working on the drag and drop problem, I outlined a possible solution here https://github.com/WordPress/gutenberg/pull/25187#issuecomment-950357863

ribaricplusplus avatar Oct 25 '21 12:10 ribaricplusplus

I understand resolving this issue doesn't aid progression according to whatever philosophy this project necessitates. Still, long-standing obvious bugs like these make the experience negative for both user and developer. The fix in the PR seems simple enough to test and approve within 15 minutes.

sybrew avatar Jun 04 '22 23:06 sybrew

4.5 years later... Any word on a fix?

thomasfw avatar Dec 16 '22 19:12 thomasfw

I'm not sure what the PRs addressed by this point, but dragging meta boxes still causes scrolling issues, and empty meta box fields cannot be populated in WP 6.1.1 and Gutenberg 14.9.1. This makes debugging a nightmare, switching back and forth between the tried and true Classic Editor and this confusion.

sybrew avatar Jan 13 '23 19:01 sybrew