Setting the file. One moment. Debugging · Wp Interactivity API · WordPress/agent-skills · Skills Docs
- Confirm the interactive root exists in the rendered HTML (
data-wp-interactive).
- Confirm the view script module is loaded (network + source maps).
- Confirm store namespace matches what markup expects.
- Check console for errors before any interaction.
Reduce scope:
- temporarily remove directives to isolate which directive/store path breaks.
If hydration mismatch occurs:
- ensure initial state/context matches server markup.
State not persisting across navigation:
getServerState() and getServerContext() now reset between client-side page transitions.
- If you relied on stale values persisting, refactor to use the store’s reactive state instead.
Multiple plugins conflicting on same element:
- Use unique directive IDs with the
--- separator to avoid attribute collisions.
- Example:
data-wp-on--click---my-plugin="actions.handle"
data-wp-ignore not working:
- This directive is deprecated in 6.9 and will be removed. It caused context inheritance and navigation bugs.
- Find an alternative approach (conditional rendering, separate interactive regions).
Router regions / overlays not rendering:
- WordPress 6.9 adds
attachTo property for router regions to render overlays anywhere on the page.
- Ensure nested router regions are properly structured.
(opens in a new tab)