-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Describe the bug
Since version 1.3.4 the plugin always includes the block assets for tabs and tab items. This causes a chain reaction, because of dependencies, that leads to an GET-request for every visitor on the site.
The tabs and tab item blocks both have wp-block-editor as dependency, which on it's place again has dependencies on wp-preferences and wp-preferences-persistence.
wp-preference has an after script that looks like this:
<script type="text/javascript" id="wp-preferences-js-after">
/* <![CDATA[ */
( function() {
var serverData = false;
var userId = "0";
var persistenceLayer = wp.preferencesPersistence.__unstableCreatePersistenceLayer( serverData, userId );
var preferencesStore = wp.preferences.store;
wp.data.dispatch( preferencesStore ).setPersistenceLayer( persistenceLayer );
} ) ();
/* ]]> */
</script>
which triggers the GET-request. When not logged in, the request fails.
Steps to Reproduce
- Go to https://iculture.nl
- Check the network tab and see a request to https://www.iculture.nl/wp-json/wp/v2/users/me?context=edit&_locale=user is made.
- If you look at the initiator stack, it appears to becoming from the
preference-js-afterscript, which is included af terpreferences-js.
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress information
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type:bugSomething isn't working.Something isn't working.
Type
Projects
Status
Code Review