amp-library icon indicating copy to clipboard operation
amp-library copied to clipboard

Error "The script tag for amp-user-notification is likely included twice in the page". Circular dependency in validator-generated.php

Open apugacescu opened this issue 4 years ago • 0 comments

What's the issue?

Using Drupal 8 with stable amp module version 2.1 https://www.drupal.org/project/amp/releases/8.x-2.1 and amp-library version 1.1.4

How do we reproduce the issue?

Include amp-user-notification element, the library will attempt to add the dependencies automatically for this custom element. validator-generated.php stores the spec for the amp elements and amp-user-notification has the following dependencies defined $o_994->also_requires_tag = ['amp-analytics extension .js script', 'amp-user-notification extension .js script']; https://github.com/Lullabot/amp-library/blob/master/src/Spec/validator-generated.php#L4257

Which results in two script additions. Tested by removing the second dependency.

What browsers are affected?

All browsers.

Which AMP version is affected?

Using 1.1.4.

apugacescu avatar Mar 12 '20 16:03 apugacescu