WordPress.org

Ready to get started?Download WordPress

Forums

Single Latest Posts Lite
W3C Validation (6 posts)

  1. romaiden
    Member
    Posted 11 months ago #

    I can't validate my page (http://www.immiflex.com/ImmiNews-wellmune/) where I'm using this pluging and I received back this message:

    document type does not allow element "script" here; assuming missing "li" start-tag
    …iv><script type='text/javascript'>console.log('2')</script><div class='sl…

    At a first moment, I had another issue in regards to <script> tag, because there were no type, now I fixed this, but I don't know what I could do with this to fix the problem, because the error is saying this <script> tag shouldn't be there (inside the

      tag) and I don't know exactly where I should move it to.

      Thanks!

    http://wordpress.org/plugins/single-latest-posts-lite/

  2. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 11 months ago #

    Hi, I was debugging and forgot to remove that line of code. I've uploaded version 1.4.1 which fixes this issue. Please update and let me know if it works.

  3. romaiden
    Member
    Posted 11 months ago #

    I'm really glad with your availability and how you help the people here.

    I just downloaded the latest version, now 1.4.2 and tried to validate, but it's still not working well, as follow:

    document type does not allow element "div" here; assuming missing "li" start-tag
    …><div class='slposts-ulist-pagination slp-pagination'><ul class='page-numbers'>

    Now in place of the script tag, the div tag is the problem, because you have this structure:
    < ul > // main ul
    .< li > // post list
    .< /li> // close post list
    .< div class='slposts-ulist-pagination slp-pagination' > // pagination box
    ..< ul class="page-numbers" > // pages ul
    ...< li > // numbers
    ...< /li > // close numbers
    ..< /ul > // close pages ul
    .< /div > // close pagination box
    < /ul> // close main ul

    And you can't have a div tag inside the ul tag. I tried to add a object tag before the div tag, on 902 and 989 lines, but I received the same error message, but pointing to object tag as follow:

    document type does not allow element "object" here; assuming missing "li" start-tag
    … May 17, 2013</span></div><object><div class='slposts-ulist-pagination sl…

    So what you should to do is close the "main ul" before open the "pagination box - div tag", I guess.

    Awaiting updates...
    Thank you.

  4. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 11 months ago #

    Hello, indeed I'm aware of this validation issue when using lists. You could use for instance blocks instead of lists (setting display_type=block) then style blocks to display as lists instead of floating elements. However I'm working on improvements to the HTML nodes displaying information to avoid validation issues.

  5. romaiden
    Member
    Posted 9 months ago #

    Hello, Jose...
    ok, I guess that I found a way (I hope it does not destroy other parts):

    I only changed this:
    'pagination_o' => "<div class='slposts-ulist-pagination slp-pagination'>",
    'pagination_c' => "</div>",

    Into this:
    'pagination_o' => "<li class='slposts-ulist-pagination slp-pagination'>",
    'pagination_c' => "</li>",

    NOTE: you have this in two places, so it is needed to fix both.

    Here seems it works very well and has passed by validation sieve.

    Please, give me a feedback if I am on the right way.
    Thank you

  6. yitwail
    Member
    Posted 7 months ago #

    I fixed the pagination <div> validation error by specifying display_type=block but then there's another validation error for a <link> element in the footer. To fix this, I added these 2 lines to functions.php:

    remove_action('wp_head','slp_load_styles',10,1);
    add_action('wp_enqueue_scripts','slp_load_styles',100,1);

    This is a great plugin, but validation errors are dangerous, especially with IE.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.