WordPress.org

Ready to get started?Download WordPress

Forums

Q and A Focus Plus FAQ
[resolved] Short code missing closing div (12 posts)

  1. rcass
    Member
    Posted 4 months ago #

    Hey there I noticed when using the short codes that it was missing some closing divs.

    I created a patch I wanted you to be aware of it.

    Here is the link to the patch

    Hopefully there will be an official fix in the future.

  2. ELsMystERy
    Member
    Plugin Author

    Posted 3 months ago #

    EDITED... SEE POST BELOW.

  3. ELsMystERy
    Member
    Plugin Author

    Posted 3 months ago #

    I looked at this and I do not see where any divs are actually missing. I did several things:

    1. Matched the divs up in the source code.

    2. Inspected the page and looked for any missing, or extra divs.

    3. Validated the HTML at w3.org.

    Please tell me where the divs are that are missing closing tags because if closing tags were missing the entire WP template would get messed up.

  4. rcass
    Member
    Posted 3 months ago #

    The divs are missing in shortcodes.php

    I had to add closing divs under line 271. This is what I added:

    $qafp_shortcode_output .= '</div></div>';

    I was having issues with my WP theme being messed up, when I matched divs up, I found the divs from the short code were not closed. So once I added the closing divs to the plugin everything worked as expected.

  5. ELsMystERy
    Member
    Plugin Author

    Posted 3 months ago #

    I know where you put the closing tags. What needs to be known is what divs those are actually closing because they might not actually be divs that are related to the plugin. I can't just put closing divs in the middle of the code. I need to know exactly what divs need to be closed. When I diagnosed it all of the plugin's divs were closed.

    Please investigate a little further and see if you can find the divs that need closing. You can remove the divs from the plugin and then run the page through the W3C HTML validator ( http://validator.w3.org/ ) and it will tell you where the divs are that are not closed.

    My guess is it is more likely another plugin, or your theme causing a conflict. However, if you show me that there are divs that need closing in QAFP, I will fix it.

  6. hathhai
    Member
    Posted 1 month ago #

    I got the same problem if using shortcode with homelink=none. After investigating the code, I added the following line after line 271

    else $qafp_shortcode_output .= '</div>';

    And everything works fine now.

  7. ELsMystERy
    Member
    Plugin Author

    Posted 1 month ago #

    Homelink=none will help me pinpoint this better. I will look into it.

  8. ELsMystERy
    Member
    Plugin Author

    Posted 1 month ago #

    OK... I see what was wrong and it will be fixed in the next update.

  9. bluepixeldesign
    Member
    Posted 1 month ago #

    Great! When will that be?

  10. ELsMystERy
    Member
    Plugin Author

    Posted 1 month ago #

    Probably later tonight, or very early tomorrow morning.

  11. bluepixeldesign
    Member
    Posted 1 month ago #

    Thanks! If the problem gets worked out soon, I'll be able to use it on my current client's site and also add it to my list of favourite plugins.

  12. rcass
    Member
    Posted 3 weeks ago #

    Thanks! Sorry I didn't reply previously with more code, I am glad you have a fix :)

Reply

You must log in to post.

About this Plugin

About this Topic