WordPress.org

Ready to get started?Download WordPress

Forums

WP-Ajaxify-Comments
[resolved] Avatars not showing after submitting a comment (7 posts)

  1. ovinic
    Member
    Posted 1 year ago #

    Hello and thank you for this great plugin.
    I'm having a small issue with the avatars not being displayed after submitting a comment. I ran the debug mode and all the selectors are found. I'm using a child theme of the tewntytwelve theme. My site is currently installed on a local dev environment and unfortunately I can't link to it.

    After a page reload the avatars are displayed as they should.
    You can view the screenshots of the console log and a test comment here:
    http://i6.minus.com/iDrfJYpkfqlOl.png
    http://i2.minus.com/i5OiDafusNbz2.png

    Thanks!

    http://wordpress.org/extend/plugins/wp-ajaxify-comments/

  2. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Hi ovinic,
    thanks for your comment. What's the exact name of the theme you are using? Do you use any other plugins that are responsible for showing/manipulating the avatar pictures?

  3. ovinic
    Member
    Posted 1 year ago #

    Hi,
    I'm using a child theme that I designed myself and named it after my domain (ovinic). I'm not using any other plugins for showing avatar pictures.

    Thank you.

  4. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Is the avatar image displayed correctly when you use the default/unmodified tewntytwelve theme?

    Could you please post the HTML source code of the broken avatar image? You can extract the HTML source code of the broken avatar image with a tool like Firebug.

    Hope this helps...

  5. ovinic
    Member
    Posted 1 year ago #

    No, the avatar isn't displayed correctly with the twentytwelve theme either. I think I found out what is causing this issue by looking at the html with firebug. It's a conflict with the lazy load plugin. This is the html output for the avatar image:
    http://jsfiddle.net/9mfy2/

    So the source of the image is actually a transparent gif. I think lazy load does this for all the images when a page is reloaded and only replaces the transparent gif with the actual image when it is visible in the viewport. For some reason it doesn't do it for the avatar images when using WP-Ajaxify-Comments.

  6. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    I think lazy-load causes the problem here. Please try the following settings:

    'OnAfterUpdateComments' callback:
    jQuery('img[data-lazy-src]').each(function() { var src = jQuery(this).attr('data-lazy-src'); if (!src) return; jQuery(this).removeAttr('data-lazy-src').attr({'data-lazy-loaded': 'true', 'src': src}); });

    Hope this helps ...

  7. ovinic
    Member
    Posted 1 year ago #

    Awesome! Lazy load was definitely causing the problem, but now everything works great with the code above. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.