Skip to content

Interactivity API shows incorrect deprecation warning in 6.8 when Gutenberg plugin not active #69975

Open
@bhattaganesh

Description

@bhattaganesh

Description

Description:
The Interactivity API shows a deprecation warning in WordPress 6.8 (Using the synchronous event.preventDefault() function in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 6.9. Please wrap the store action in withSyncEvent().) even when:

The action is properly wrapped in withSyncEvent()

Following all documented best practices

The warning disappears when Gutenberg plugin is active

This contradicts the Interactivity API best practices post which states these warnings shouldn't appear in 6.8.

Step-by-step reproduction instructions

  1. Install fresh WordPress 6.8 (without Gutenberg plugin)
  2. Enable a block using Interactivity API navigation (like Query Loop with enhanced pagination)
  3. Open browser console
  4. Click on pagination links
  5. Observe deprecation warning

Expected Behavior:

  • No deprecation warnings should appear in WordPress 6.8 when:

  • Using withSyncEvent() properly

  • Following documented best practices

  • Consistent behavior between core and plugin versions

Actual Behavior:

  • Warning appears in WordPress 6.8 core

  • Warning disappears when Gutenberg plugin is active

  • Warning appears even in correct implementations

Screenshots, screen recording, code snippet

https://drive.google.com/file/d/1hnftbr0Xg8phYXNFHDis-A5giIbB5wT5/view?usp=sharing

Environment info

  • Affected version: WordPress 6.8
  • Components affected:
    • Interactivity API runtime
    • Router implementation
  • Console warning: Using the synchronous event.preventDefault() function in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 6.9. Please wrap the store action in withSyncEvent().

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

Labels

[Feature] Interactivity APIAPI to add frontend interactivity to blocks.[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

Status

🏗️ In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions