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
When activating this gist plugin which is rendering an amp-story without the required standalone attribute (resulting in the entire amp-story being removed), there are warnings being raised by code in AMP_Style_Sanitizer::get_validate_response_data():
PHP Warning: Couldn't fetch DOMElement. Node no longer exists in …/amp/includes/sanitizers/class-amp-style-sanitizer.php on line 2924
PHP Notice: Undefined property: DOMElement::$attributes in …/amp/includes/sanitizers/class-amp-style-sanitizer.php on line 2924
PHP Warning: Invalid argument supplied for foreach() in …/amp/includes/sanitizers/class-amp-style-sanitizer.php on line 2924
PHP Warning: Couldn't fetch DOMElement. Node no longer exists in …/amp/includes/sanitizers/class-amp-style-sanitizer.php on line 2928
PHP Notice: Undefined property: DOMElement::$nodeName in …/amp/includes/sanitizers/class-amp-style-sanitizer.php on line 2928
Bug Description
When activating this gist plugin which is rendering an
amp-story
without the requiredstandalone
attribute (resulting in the entireamp-story
being removed), there are warnings being raised by code inAMP_Style_Sanitizer::get_validate_response_data()
:Line 2924:
amp-wp/includes/sanitizers/class-amp-style-sanitizer.php
Line 2924 in f158192
Line 2928:
amp-wp/includes/sanitizers/class-amp-style-sanitizer.php
Line 2928 in f158192
This is strange to me because the original
DOMElement
object is being stored in thepending_stylesheets
array. Somehow the reference is going bad.Expected Behaviour
No warnings should be emitted when the style sanitizer is iterating over the
pending_stylesheets
when elements are removed from the document.Steps to reproduce
?try_node_no_longer_exists_warning=1
Screenshots
In the Stylesheets metabox you'll also see:
The
title
attribute value is<>
.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: