Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught DOMException adjusting attributes #3753

Closed
tomjn opened this issue Nov 14, 2019 · 1 comment
Closed

Uncaught DOMException adjusting attributes #3753

tomjn opened this issue Nov 14, 2019 · 1 comment

Comments

@tomjn
Copy link

tomjn commented Nov 14, 2019

Bug Description

PHP Fatal error:  Uncaught DOMException: Not Found Error in /srv/www/..../plugins/amp/includes/sanitizers/class-amp-base-sanitizer.php:477

Specifically this in remove_invalid_attribute

		if ( $should_remove ) {
			$element->removeAttributeNode( $node );
[11-Nov-2019 20:12:05 UTC] PHP Fatal error:  Uncaught DOMException: Not Found Error in /srv/www/.../plugins/amp/includes/sanitizers/class-amp-base-sanitizer.php:477
Stack trace:
#0 /srv/www/.../plugins/amp/includes/sanitizers/class-amp-base-sanitizer.php(477): DOMElement->removeAttributeNode(Object(DOMAttr))
#1 /srv/www/.../plugins/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php(585): AMP_Base_Sanitizer->remove_invalid_attribute(Object(DOMElement), Object(DOMAttr), Array)
#2 /srv/www/.../plugins/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php(302): AMP_Tag_And_Attribute_Sanitizer->process_node(Object(DOMElement))
#3 /srv/www/.../plugins/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php(287): AMP_Tag_And_Attribute_Sanitizer->san in /srv/www/.../plugins/amp/includes/sanitizers/class-amp-base-sanitizer.php on line 477

Steps to reproduce

We're unsure of the content/URL that's generating this at the moment

Additional context

  • WordPress version: 5.2.3
  • Plugin version: 1.3.0
  • Gutenberg plugin version (if applicable): n/a
  • AMP plugin template mode:
  • PHP version: 7.2.24-1+ubuntu16.04.1+deb.sury.org+1
  • OS: Ubuntu
  • Browser: unknown
  • Device: unknown

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

@westonruter
Copy link
Member

@tomjn This should have been fixed in 1.4.1 via #3682

Please update and confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants