• Resolved Corrado Prever

    (@artphotoasia)


    Hi there, after last update to 1.0.0 I noted some issue that maybe can be fixed:

    1) not valid w3c anymore (just use data-xxx before the custom attribute you are using in the code).

    2) the last layout ‘instagram’ I think is not displaying properly (at least on my template) how I have to set it?
    I mean with which image size thb, small, medium, big ?
    In any case is showing really strange.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello Corrado Prever,

    Thank you for your feedback !

    1) Sounds indeed easily fixable ! I’ve added it to our todo list !

    2) Hmmm Instagram layout is just squares, you can use whichever size, even though for resolution purpose I would advise you to use Medium or Large !
    But you can send me a screenshot of the layout so I can see what’s wrong 🙂

    Best regards,
    Thomas

    Hello Corrado Prever,

    A quick update on your first issue with W3C validity, we have changed the attributes names in the code and it’s available with the latest update !

    Cheers,

    Thread Starter Corrado Prever

    (@artphotoasia)

    Hi Thomas

    Thanks for the work but the page with the gallery is not yet valid W3C after update to 1.0.1

    Check this url https://www.corradoprever.com/fotografia/italia-2017/immagini-rio-freddo-malinvern-valscura-alpi-marittime/
    on
    https://validator.w3.org/

    you will see what I mean…

    Thread Starter Corrado Prever

    (@artphotoasia)

    Hi Thomas
    this are the errors

    Element img is missing required attribute src.

    The sizes attribute may be specified only if the srcset attribute is also present.

    Hello Corrado,

    Roger ! We will fix it in the next update of the plugin, thank you for your help 🙂

    Best regards,
    Thomas

    Thread Starter Corrado Prever

    (@artphotoasia)

    You welcome… will wait next release….

    Hello Corrado Prever,

    we’ve released the new version that should have fixed the 2 W3C non-valid things you pointed out.

    Cheers,

    • This reply was modified 8 years, 8 months ago by Thomas.
    Thread Starter Corrado Prever

    (@artphotoasia)

    Hi thomas
    here i saw an error…

    if ( isset( $attr[‘src’] ) ) {
    $attr[‘data-mgl-src’] = $attr[‘src’];
    $attr[‘src’] = ‘//:0’;
    }
    what is //:0 ????????

    should be like that the function?

    function wp_get_attachment_image_attributes( $attr ) {
    if ( $this->gallery_process ) {
    if ( isset( $attr[‘sizes’] ) ) {
    $attr[‘data-mgl-sizes’] = $attr[‘sizes’];
    unset( $attr[‘sizes’] );
    }
    if ( isset( $attr[‘src’] ) ) {
    $attr[‘data-mgl-src’] = $attr[‘src’];
    $attr[‘src’] = ‘data-mgl-src’;
    }
    if ( isset( $attr[‘srcset’] ) ) {
    $attr[‘data-mgl-srcset’] = $attr[‘srcset’];
    unset( $attr[‘srcset’] );
    }
    }
    return $attr;
    }

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    Why do you think this is an error? Because it is not 🙂

    This choice was made to actually make the impossible possible. Of course, I am talking about the infinite/lazy loading with W3C validation. Personally, I don’t care (and I think people shouldn’t care too much) about W3C validation, it is just there to make sure big mistakes weren’t made, but warnings and notices are just here FYI. Anyway, we wanted to make the plugin perfect for you so we struggled to find a way to bring 100% W3C validation.

    Now, about the specifics, somebody on StackOverflow made a good explanation about it:

    Starting with // (omitting the protocol) causes the protocol of the current page to be used, preventing “insecure content” warnings in HTTPS pages. Skipping the host name isn’t necessary, but makes it shorter. Finally, a port of :0 ensures that a server request can’t be made (it isn’t a valid port, according to the spec).

    This is the only URL which I found caused no server hits or error messages in any browser. The usual choice — javascript:void(0) — will cause an “insecure content” warning in IE7 if used on a page served via HTTPS. Any other port caused an attempted server connection, even for invalid addresses. (Some browsers would simply make the invalid request and wait for them to time out.)

    Reference: https://stackoverflow.com/questions/5775469/whats-the-valid-way-to-include-an-image-with-no-src

    Thread Starter Corrado Prever

    (@artphotoasia)

    Great Job man!
    I agree with you on W3C but is always useful to check because sometimes can find strange errors.

    I though was an error (maybe a typo) as never see before so strange url…
    But I was not sure at all.

    I understand what you said, and so keep going… is a great plugin!

    Plugin Author Jordy Meow

    (@tigroumeow)

    No problem 🙂 It does really look like an error actually and I was really surprised by this trick at first.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘last update issues’ is closed to new replies.