Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ZebulanStanphill opened this issue Jul 13, 2018 · 34 comments · Fixed by #25187
Labels
[Feature] Meta Boxes A draggable box shown on the post editing screen [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended

Comments

@ZebulanStanphill
Copy link
Member

ZebulanStanphill commented Jul 13, 2018

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.

@Soean Soean added the [Feature] Meta Boxes A draggable box shown on the post editing screen label Jul 14, 2018
@xenobytezero
Copy link

Confirm that this is still an issue in 3.5.0

@ZebulanStanphill
Copy link
Member Author

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

@xenobytezero
Copy link

Still an issue in 4.1.0.

@earnjam earnjam added the [Type] Bug An existing feature does not function as intended label Nov 2, 2018
@earnjam
Copy link
Contributor

earnjam commented Nov 2, 2018

@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?

@ZebulanStanphill
Copy link
Member Author

@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.

@earnjam
Copy link
Contributor

earnjam commented Nov 2, 2018

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.

@xenobytezero
Copy link

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.

@danbru1989
Copy link

Still an issue in 5.1.1

@avdi
Copy link

avdi commented Feb 25, 2020

Is there a workaround for this?

@ZebulanStanphill
Copy link
Member Author

@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.

@sybrew
Copy link

sybrew commented Feb 27, 2020

save the dummy post/page

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

@eliasbutting
Copy link

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.

@pixolin
Copy link

pixolin commented Sep 4, 2020

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

@tacoverdo
Copy link

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.

@ZebulanStanphill ZebulanStanphill added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Drag and Drop Drag and drop functionality when working with blocks labels Sep 4, 2020
aristath added a commit to aristath/gutenberg that referenced this issue Sep 9, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Sep 9, 2020
@mxnr
Copy link

mxnr commented Nov 22, 2020

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.

@naturfreunde-schweiz-organization-owner

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.

@aristath
Copy link
Member

aristath commented Jan 8, 2021

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 #25187 so as soon as that one gets merged this should no longer be an issue.

@thomasplevy
Copy link
Contributor

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.

@paaljoachim
Copy link
Contributor

paaljoachim commented Feb 20, 2021

Please head on over and give additional feedback on the PR.
#25187
Thanks!

@Guihom35
Copy link

Guihom35 commented Jun 4, 2021

Hi, no solution in version 5.7.2 ??

@AltanS
Copy link

AltanS commented Jul 12, 2021

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

@mfs-mc
Copy link

mfs-mc commented Jul 12, 2021

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' );

@davidmondok
Copy link

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

@thomasplevy
Copy link
Contributor

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.

@paaljoachim
Copy link
Contributor

paaljoachim commented Oct 23, 2021

Hey Thomas @thomasplevy

I am hoping that @ribaricplusplus might be able to help out with the stalled PR: #25187 (comment)

aristath added a commit that referenced this issue Oct 25, 2021
* Fixes #7960

* Remove isVisible from withSelect

* Restore some files from trunk

Co-authored-by: Bruno Ribarić <[email protected]>
@aristath aristath reopened this Oct 25, 2021
@aristath
Copy link
Member

The PR on #25187 was merged, reopening this issue as per the comment on #25187 (comment) 👍

@ribaricplusplus
Copy link
Member

ribaricplusplus commented Oct 25, 2021

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 #25187 (comment)

vcanales pushed a commit that referenced this issue Oct 27, 2021
* Fixes #7960

* Remove isVisible from withSelect

* Restore some files from trunk

Co-authored-by: Bruno Ribarić <[email protected]>
@sybrew
Copy link

sybrew commented Jun 4, 2022

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.

@ndiego ndiego removed the [Status] In Progress Tracking issues with work in progress label Jun 28, 2022
@thomasfw
Copy link

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

@sybrew
Copy link

sybrew commented Jan 13, 2023

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
Copy link

sybrew commented Jan 13, 2023

Still, there's no reason to make meta-box titles look like this:

image

While uniformity should be possible with only a few CSS line changes:

image

Remove the arrows that were implemented only as a workaround for the (still) bugged drag/drop experience, and meta boxes can work as-is without making Gutenberg feel like a downgraded experience.

@t-hamano
Copy link
Contributor

It's been a long time since this issue was submitted, so I'd like to know what's still not resolved in this issue.

In the latest Gutenberg, the meta box area below the content is variable height. Furthermore, you can use the chevron icons to rearrange the order of meta boxes or move them to another meta box area.

Image

Do you want to be able to rearrange or move them by dragging them?

@ZebulanStanphill
Copy link
Member Author

The current functionality is definitely an improvement: the chevrons can be used to move metaboxes across the two areas.

You still can't drag the metaboxes from one area to another when there isn't already a metabox there, but that's a much less serious issue than not being able to move them there at all.

Should this issue be closed and a new one opened to cover the remaining bug?

@t-hamano
Copy link
Contributor

I don't have a strong opinion, but since it's been a while since this issue was filed, it might be a good idea to create a new issue based on the current metabox specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Meta Boxes A draggable box shown on the post editing screen [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.