#64272 closed defect (bug) (fixed)
Block visibility: new support key conflicts with Block Visibility plugin
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | 6.9 |
| Component: | Editor | Keywords: | has-patch has-unit-tests dev-reviewed commit |
| Focuses: | Cc: |
Description
The Block Visibility plugin predates the new block hiding functionality in WordPress 6.9, as was discussed early in the new feature's development.
While the current core functionality and the plugin's functionality can complement each other, they conflict in their use of the blockVisibility block support key.
The practical consequence of this conflict that I experienced is that isn't possible to turn off core's block-hiding functionality for a particular block (via register_block_type_args) while also allowing the Block Visibility plugin to apply to that block. The blockVisibility support key will be set to true by the plugin, and so core's UI will be turned back on. As things stand, when 6.9 is released, my sites that use the plugin would begin to see two ways to hide a block that behave differently, and as far as I can tell, I can't prevent it.
It would be disappointing for this conflict to make it into core since it was an avoidable conflict and since it's not too late to fix it. The original Block Visibility plugin has 40,000 installations, which might not be large, but it's also not small. But, if that's what's going to happen, I think it would be respectful to acknowledge it.
Change History (13)
#2
@
3 months ago
Thanks for the ping @jorbin . It's indeed an issue. I created an issue on Github so we can discuss a possible solution:
This ticket was mentioned in PR #10530 on WordPress/wordpress-develop by @wildworks.
3 months ago
#4
- Keywords has-patch has-unit-tests added
#5
@
3 months ago
Unfortunately, the attached patch cannot be tested until the next Gutenberg sync is run.
This is because the old blockVisibility key is still used in block.json, which is updated by the Gutenberg sync.
#6
@
3 months ago
I appreciate you outlining the problem. I tested this locally, and the issue persists.
Many blocks have blockVisibility set to true when the Block Visibility plugin is active. As a result, even if I try to disable the core visibility UI using register_block_type_args, it turns it back on.
This indicates that the plugin's visibility UI and the core visibility UI appear simultaneously. Users will find that confusing, and developers are powerless to stop it.
The plugin is utilized on about 40,000 websites and predates the new core feature. It would be beneficial for site owners and plugin developers to at least acknowledge the conflict in order to get ready for WordPress 6.9.
Kindly see the below image :
https://postimg.cc/gallery/cSfkmvm
#7
@
3 months ago
- Owner set to wildworks
- Resolution set to fixed
- Status changed from new to closed
In 61285:
#8
@
3 months ago
- Keywords dev-feedback added
- Resolution fixed deleted
- Status changed from closed to reopened
I'd like to reopen this ticket according to the backporting process.
Dear @ramonopoly @andrewserong, could you confirm if it's OK to backport the patch to the 6.9 branch?
Moving to 6.9 for visibility. Not sure if this should be reported in https://github.com/WordPress/gutenberg/ instead though cc/ @cbravobernal
Related to: #64061.