Make WordPress Core

Opened 5 weeks ago

Last modified 24 hours ago

#61044 assigned enhancement

Interactivity API: Debug - Warning about Server Directives Processing errors.

Reported by: cbravobernal's profile cbravobernal Owned by: cbravobernal's profile cbravobernal
Milestone: 6.6 Priority: normal
Severity: normal Version: 6.5
Component: Interactivity API Keywords: has-patch
Focuses: Cc:

Description (last modified by cbravobernal)

This PR aims to improve the developer experience of the Interactivity API server directives processing.
Right now, the SSR won't work if there is any directive inside a SVG or MATHML tag. Or the HTML is unbalanced (there is some closer tag missing).

This PR adds a warning in those cases, if the developer is in debug mode.

I added also notices for cases where the directive is empty, or the namespace is an empty string, an empty object or null.

Change History (7)

This ticket was mentioned in PR #6413 on WordPress/wordpress-develop by @cbravobernal.

5 weeks ago

  • Keywords has-patch added

Trac ticket:

Draft PR. Is still work in progress.

#2 @cbravobernal
3 weeks ago

  • Milestone changed from Awaiting Review to 6.6
  • Type changed from defect (bug) to enhancement

#3 @jonsurrell
3 weeks ago

  • Component changed from General to Interactivity API

#4 @gziolo
2 weeks ago

  • Version set to 6.5

@cbravobernal commented on PR #6413:

2 weeks ago

I think the messages could be a bit more brief (#6413 (review)) but this is working well generally. Thanks!

Done in

@cbravobernal commented on PR #6413:

34 hours ago

I'm adding more checks to the SSR processing. Now it will also check that the namespace is not {}, "" "empty string", or null written as a string.
That way it won't cause weird behaviors in the runtime.

#7 @cbravobernal
24 hours ago

  • Description modified (diff)
  • Owner set to cbravobernal
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.