[wp-trac] [WordPress Trac] #56778: Block usage isn't being persisted for usage in WordPress 6.1
WordPress Trac
noreply at wordpress.org
Mon Oct 10 08:38:24 UTC 2022
#56778: Block usage isn't being persisted for usage in WordPress 6.1
--------------------------+------------------------
Reporter: talldanwp | Owner: talldanwp
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.1
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------
Description changed by talldanwp:
Old description:
> Reporting a bug that I caused accidentally in the backport for the new
> persisted preferences (https://github.com/WordPress/wordpress-
> develop/pull/3219, 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.
>
> 1. Open up a block editor and insert the same block a few times (e.g.
> Code block).
> 2. Trigger the `/` inserter an notice Code is now top of the list.
> 3. Reload the block editor.
> 4. 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.
New description:
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.
1. Open up a block editor and insert the same block a few times (e.g. Code
block).
2. Trigger the `/` inserter an notice Code is now top of the list.
3. Reload the block editor.
4. 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.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56778#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list