amp-library
amp-library copied to clipboard
amp-sidebar is being removed
While trying to use amp-sidebar more than once on same page, it removes all other amp-sidebar except for first.
I am facing issue as in #3320 of amphtml issues log, while plain html works fine, while implementing it in drupal 7 websites second implementation of amp-sidebar is seems to be removed by Lullabot amp-library.
This is the sample html where second implementation of amp sidebar is being removed.
<amp-sidebar id="section" layout="nodisplay" side="left">
<span>
<a class="close" on="tap:section.close"></a>
</span>
<ul>
<li><a href="#" class="plus" on="tap:item.toggle">Section</a></li>
<li><a href="#" class="plus" on="tap:item.toggle">Section</a></li>
</ul>
</amp-sidebar>
<amp-sidebar id="item" layout="nodisplay" side="left">
<span>
<a class="close" on="tap:item.close, section.close"></a>
<a class="back" on="tap:item.close"></a>
</span>
<ul>
<li><a href="#">Item</a></li>
<li><a href="#">Item</a></li>
</ul>
</amp-sidebar>
Thanks
on line 270 - The tag 'amp-sidebar' appears more than once in the document. [code: DUPLICATE_UNIQUE_TAG category: MANDATORY_AMP_TAG_MISSING_OR_INCORRECT see: https://github.com/ampproject/amphtml/blob/master/extensions/amp-sidebar/amp-sidebar.md] ACTION TAKEN: amp-sidebar tag was removed due to validation issues. on line 283 - The tag 'amp-sidebar' appears more than once in the document. [code: DUPLICATE_UNIQUE_TAG category: MANDATORY_AMP_TAG_MISSING_OR_INCORRECT see: https://github.com/ampproject/amphtml/blob/master/extensions/amp-sidebar/amp-sidebar.md] ACTION TAKEN: amp-sidebar tag was removed due to validation issues.
A test case with valid AMP HTML with more than once amp-sidebar ends up being removed by lullbot amp library
This is no more a bug in AMP Project and has been added and is being used in current implemtation of AMP Project with amp-sidebar being used more than once.
https://github.com/ampproject/amphtml/issues/6104
However, Lullabot amp library removed any other implementation of amp-sidebar.
validator-generated.php is old implementation is not updated.