Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Oh thanks for pointing that out! We’ll fix in 1.5.3 today.

    Ryan Kienstra

    (@ryankienstra)

    Thanks for opening this! Your videos are great, especially on agile.

    I’m working on this.

    Background

    This definitely looks to be an issue.

    When adding this to a Custom HTML block:

    
    <amp-list
      width="auto"
      height="100"
      layout="fixed-height"
      src="/static/inline-examples/data/amp-list-urls.json"
    >
        <template type="amp-mustache">
            <amp-img src=”{{src}}” srcset=”{{srcset}}” width=”{{width}}” height=”{{height}}” layout=”responsive” alt=”Episode Thumbnail Image for {{title}}”></amp-img>
        </template>
    </amp-list>
    

    …theres a validation error ‘Invalid value ”{{width}}” for attribute width.’

    There are also validation errors for the attributes for and image when I removed the width and height attributes:

    
    <amp-list
      width="auto"
      height="100"
      layout="fixed-height"
      src="/static/inline-examples/data/amp-list-urls.json"
    >
        <template type="amp-mustache">
            <amp-img src=”{{src}}” srcset=”{{srcset}}” alt=”Episode Thumbnail Image for {{title}}”></amp-img>
        </template>
    </amp-list>
    
    Thread Starter Jayme Edwards

    (@jcedwards76)

    Thanks you two!

    This plugin is fantastic btw. I’m developing a custom theme locally to launch a new version of my site and so far it’s been a great experience.

    Thanks again for the support.

    Jayme

    Ryan Kienstra

    (@ryankienstra)

    Nice, thanks so much for using this plugin. Good to hear you’re writing a custom theme with this.

    This also looks to be an issue when the <template> is not wrapped in <amp-list>. 1.4.4 is the latest version where I didn’t see this issue.

    Thread Starter Jayme Edwards

    (@jcedwards76)

    I’m not sure if this helps or not, but here’s the full hierarchy of content I have starting from amp-list:

    
    <amp-list class="amp-2col-list" width="auto" height="530" layout="fixed-height" load-more="auto" src="<?php echo site_url('/wp-json/jesite/v1/hsd-episodes?page=1') ?>">
      <div placeholder>Loading ...</div>
      <div fallback>Failed to load Healthy Software Developer Episodes.</div>
      <template type="amp-mustache">
        <div class="list-item post">
          <a href="{{url}}">
            etc...
    
    Plugin Author Weston Ruter

    (@westonruter)

    The issue is likely a regression introduced by the new AMP_Layout_Sanitizer in 1.5. The same exemption used in the AMP_Tag_And_Attribute_Sanitizer to skip validating attributes containing {{.+}} inside of template tags needs to be done by the layout sanitizer.

    Ryan Kienstra

    (@ryankienstra)

    Plugin Author Weston Ruter

    (@westonruter)

    That’s right.

    Ryan Kienstra

    (@ryankienstra)

    Hi @jcedwards76,
    Hope you’re having a good day.

    If you have a chance, could you please test this build of the plugin with a fix for this issue?

    https://github.com/ampproject/amp-wp/pull/4583#issuecomment-614162529

    Thanks, Jayme!

    Thread Starter Jayme Edwards

    (@jcedwards76)

    @ryankienstra I just tested this. Yep, it works now. The page passes when re-validated and renders properly.

    Plugin Author Weston Ruter

    (@westonruter)

    Excellent. This will be included in the next release. Thank you for testing.

    We’d appreciate a plugin review! https://wordpress.org/support/plugin/amp/reviews/#new-post

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Binding expressions flagged as invalid markup’ is closed to new replies.