• Resolved Rudolph Smits

    (@rudolph-smits)


    I want to show a WPPA-album on an AMP page. But it does not show. Does WPPA already support AMP and am I using the right code?

    <div amp-style=”display:block; margin:0px; padding:0px;”>
    [wppa type=”slideonly” album=”36″ size=”auto”][/wppa]
    </div>

    For the result is this https://www.vakantiehuisverhuur.eu/2016/12/fraiture-av/?amp=1, it shows an error.

    When called from desktop or tablet (that is: without ?amp=1) the slideshow runs nicely.

    Regards
    Rudolph Smits

    • This topic was modified 7 years, 11 months ago by Rudolph Smits.
    • This topic was modified 7 years, 11 months ago by Rudolph Smits.
    • This topic was modified 7 years, 11 months ago by Rudolph Smits.
    • This topic was modified 7 years, 11 months ago by Rudolph Smits.
Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Try (no guarantee) checking Table IV-A8: Render shortcode always

    Thread Starter Rudolph Smits

    (@rudolph-smits)

    Mr Breetvelt

    So I did and it made some difference. The message [WPPA+ Photo display (fsh)] disappears and instead it shows white space with the size of an album. But unfortunately no album.

    I will leave Render shortcode always = checked for a while. I guess that will do no harm.

    • This reply was modified 7 years, 11 months ago by Rudolph Smits.
    Thread Starter Rudolph Smits

    (@rudolph-smits)

    This amp-style=”display:block; margin:0px; padding:0px;” apparently is not supported for <div>. It has been rmoved now and there are no more amp-errors.

    But no difference for the album, same white area. But that style-declaration as possible cause has now been eliminated.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I did some research.

    You should not use AMP here. AMP is intented for static pages and using javascript is strongly limited. WPPA uses much javascript, especially when running slideshows.

    https://www.ampproject.org/learn/about-amp/

    AMP is a way to build web pages for static content that render fast.

    https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md

    While it does allow styling the document using custom CSS, it does not allow author written JavaScript beyond what is provided through the custom elements to reach its performance goals.

    In the page source i see that none of the required wppa javascript files are loaded. This is an absolute no-go.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    The only thing I can so, and will do in the version (6.6.10) is suppress the display of:

    
    [WPPA+ Photo display (fsh)]
    

    on mobile devices and/or when the querystring contains amp=1

    Thread Starter Rudolph Smits

    (@rudolph-smits)

    OK, I think I understand. The blog is for desktop and tablet as well and I would like to show the album there.

    If you are able to suppress that white space on AMP-mobile I would be glad. When shown on mobile it looks like that the page ends with that white space where one should scroll.

    Be aware the amp url indeed can be https://www.vakantiehuisverhuur.eu/2016/12/fraiture-av/?amp=1 but the “normal” amp-url = https://www.vakantiehuisverhuur.eu/2016/12/fraiture-av/amp/. So amp/ added in stead of ?amp=1. This amp-url however does not display on this site, I am trying to find a cause there too. To avoid any misunderstanding, another site that is performing AMP rightly has the same white space.

    Thanks again for all your efforts!
    Rudolph Smits

    • This reply was modified 7 years, 11 months ago by Rudolph Smits.
    • This reply was modified 7 years, 11 months ago by Rudolph Smits.
    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I will at least make it possible in the next version (expected to be released tomorrow) to have neither the white space nor the ‘placeholder’ message.

    However, I am working on a way to optionally be able to display a single image in these cases.

    I will keep you informed…

    Thread Starter Rudolph Smits

    (@rudolph-smits)

    A single image instead? Yeah, would be nice but some simple amp-coding already does that job:

    <amp-img src=”https://www.vakantiehuisverhuur.eu/img/blog/beff02-blog-320×240.jpg&#8221; srcset=”/img/blog/beff02-blog-640×480.jpg 640w, /img/blog/beff02-blog-320×240.jpg 320w” width=”320px” height=”240px” layout=”responsive” alt=”Vakantiehuis Beffe-2″></amp-img>

    So, should this be a hell of a job in WPPA, there is a solution already!

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    No, It is very simple, i added the alt attribute to the shortcode and i have it working on my testsite already:

    https://beta.opajaap.nl/en/amp-test/
    https://beta.opajaap.nl/en/amp-test/amp/

    Shortcode used (without wrapping div, i.e. no wrapping div needed):

    [wppa type="slide" album="255" alt="4187"]Any comment[/wppa]

    From the readme:

    * New shortcode attribute: alt=”…”. The alt attrinute may conatin an existing photo id number.
    In case the shortcode can not be rendered, you used to see the ‘placeholder’ [WPPA+ Photo display (fsh)].
    In some circumstances this is not due to a configuration issue, but you can e.g. have plugin AMP installed and AMP applies to the content.
    When the alt attribute is added to the shortcode, a plain photo can be displayed.
    If you do not want anything to be displayed (no photo and no errormessage) set the alt attrinbute to none: alt=”none”. Full shortcode example: [wppa type=”slide” album=”255″ alt=”4187″]Any comment[/wppa]

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    PS You MUST UNtick Table IV-A8 !!!

    Thread Starter Rudolph Smits

    (@rudolph-smits)

    Looks nice! I will implement this new shortcode as soon as the wppa-update is available.
    Thanks again!

    PS I have been trying Table IV-A8 checked as well as unchecked. There was no different behavior.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    You should have the situation where you get the message [WPPA+ Photo display (fsh)]
    This is the point in the code where is looked for alt="<photo id>" (in the next version)

    Thread Starter Rudolph Smits

    (@rudolph-smits)

    I have installed the new version. Choice between Text or icons, it works fine, Thank you!

    The blog on desktop and tablet performed fine. The photo on AMP however did NOT show. Then I remembered your remark that “you MUST UNtick Table IV-A8”. After having done that the picture was shown. Thanks again for this all!

    Maybe you should add this IV-A8 Unticked-requirement somewhere in your support text. I have had the luxury that you told me so but many others haven’t. When someone encounters the no-show problem I had they will never look at table IV-A8?

    As for me this issue has been resolved.

    There is one little thing left: type=”slideonly” does not work anymore. Type=”slide” does. Would slideonly also be possible…? I hardly dare to ask. ??

    • This reply was modified 7 years, 11 months ago by Rudolph Smits.
    Thread Starter Rudolph Smits

    (@rudolph-smits)

    The slideonly-option seems to work on an other site. I will look for differences in table-settings.

    So this seems an other topic, I will close that here.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    In future versions you will see this when you have the Table IV-A8 conflict:
    Alt / Table IV-A8 conflict

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘wppa album on amp pages’ is closed to new replies.