You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So the quick fix appears to be to eliminate the JSON_ERROR_EMPTY error code. It was introduced in #4340 (for #4320). The validator emits this as a warning:
So since addWarning is being used as opposed to addError, the JSON_ERROR_EMPTY error should be removed. It turns out that application/ld+json scripts are not validated at all.
Steps to reproduce
Enable AMP plugin with Standard or Transitional mode.
Activate Site Kit with analytics.
Validate an AMP page.
See validation error.
Screenshots
Additional Context
Plugin Version: 1.5.1
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered:
Bug Description
When testing in AMP plugin v1.5.0-RC1, I'm getting a validation error with code
JSON_ERROR_EMPTY
for ascript
emitted by Site Kit:See google/site-kit-wp#1251 and introduced in google/site-kit-wp#1252.
Nevertheless, that HTML is not invalid AMP:
It appears the
JSON_ERROR_EMPTY
is not applicable toscript
elements with of typeapplication/ld+json
. The validator spec for LD+JSON is:No error is omitted for
<amp-ima-video>
either:Its spec is:
Here it has the same CDATA spec, but one emits an warning and the other emits nothing.
It's the same for
amp-analytics
:So the quick fix appears to be to eliminate the
JSON_ERROR_EMPTY
error code. It was introduced in #4340 (for #4320). The validator emits this as a warning:So since
addWarning
is being used as opposed toaddError
, theJSON_ERROR_EMPTY
error should be removed. It turns out thatapplication/ld+json
scripts are not validated at all.Steps to reproduce
Screenshots
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: