Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Mini Cart inner blocks can be removed if unlocking them with the new WP 6.0 UI #6309

Closed
Aljullu opened this issue Apr 25, 2022 · 1 comment · Fixed by #6374
Closed

Mini Cart inner blocks can be removed if unlocking them with the new WP 6.0 UI #6309

Aljullu opened this issue Apr 25, 2022 · 1 comment · Fixed by #6374
Assignees
Labels
block: mini-cart Issues related to the Mini-Cart block. type: bug The issue/PR concerns a confirmed bug.

Comments

@Aljullu
Copy link
Contributor

Aljullu commented Apr 25, 2022

Describe the bug

WP 6.0 introduces a UI to lock/unlock blocks. That makes it possible to remove Mini Cart inner blocks if the user previously unlocks them.

To reproduce

  1. Install WordPress beta tester plugin and update to WP 6.0 beta 2.
  2. Go to Appearance > Site Editor > Template Parts > Mini Cart.
  3. Select the Mini Cart Products Table block and unlock it. Press Del or delete the block using the UI.
  4. (For some reason, I needed to repeat step 3)
  5. Notice the Mini Cart Products Table block could be removed.
Kooha-04-25-2022-16-55-19.mp4

Expected behavior

It shouldn't be possible to remove the Mini Cart Products Tabl block.

More info

Gutenberg seems to have introduced a supports.__experimentalLock flag that might be useful to prevent this (WordPress/gutenberg#39568).

@Aljullu Aljullu added type: bug The issue/PR concerns a confirmed bug. block: mini-cart Issues related to the Mini-Cart block. labels Apr 25, 2022
@dinhtungdu dinhtungdu self-assigned this May 4, 2022
@dinhtungdu
Copy link
Member

dinhtungdu commented May 4, 2022

Note that __experimentalLock has been removed from Gutenberg. I can't find any occurrence with WordPress/gutenberg@d5b0656.

Update: it was replaced by lock in WordPress/gutenberg#40145.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: mini-cart Issues related to the Mini-Cart block. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants