#56778 closed defect (bug) (fixed)
Block usage isn't being persisted for usage in WordPress 6.1
Reported by: | talldanwp | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | 6.1 |
Component: | Editor | Keywords: | has-patch commit |
Focuses: | Cc: |
Description (last modified by )
Reporting a bug that I caused accidentally in the backport for the new persisted preferences (https://github.com/WordPress/wordpress-develop/pull/3253).
In the PR, the configuration for the old preference persistence system was removed - https://github.com/WordPress/wordpress-develop/pull/3253
It turns out this was a little too eager. This system is still used for block usage data (to show the most frequently used blocks in the inserter). Furthermore some plugins may use this persistence system (though I found none on WPDirectory).
The fix is to add this code back in and I have a PR ready to do that. For 6.2 I'll work on removing any core usage of it and deprecating it.
Steps to reproduce:
Prerequisite: Remove the WORDPRESS_DATA_USER_{n} local storage data.
- Open up a block editor and insert the same block a few times (e.g. Code block).
- Trigger the
/
inserter an notice Code is now top of the list. - Reload the block editor.
- Trigger the
/
inserter again and noticed Code block is no longer top of the list.
Expected: Code should be persisted across sessions as the most used block.
Change History (5)
This ticket was mentioned in PR #3423 on WordPress/wordpress-develop by talldan.
2 years ago
#2
#3
@
2 years ago
- Keywords commit added
- Owner changed from talldanwp to audrasjb
- Status changed from assigned to accepted
I can confirm the PR fixes the issue on my side: "Most used blocks" works fine in the inserter.
Self assigning for commit
.
2 years ago
#5
committed in https://core.trac.wordpress.org/changeset/54485
In https://github.com/WordPress/wordpress-develop/pull/3253 I was a little too eager to remove the old preferences persistence configuration. This system is still used in the block editor for block inserter usage, so removing this accidentally caused the 'most used blocks' feature to stop working.
Trac ticket: https://core.trac.wordpress.org/ticket/56778
---
Steps to reproduce:
Prerequisite: Remove the WORDPRESS_DATA_USER_{n} local storage data (where {n} is your used id).
/
inserter an notice Code is now top of the list./
inserter again and noticed Code block is no longer top of the list.In trunk: The code block is no longer present at the top of the list.
In this branch: The code block should be persisted across sessions as the most used block.