WordPress.org

Forums

WP Ajaxify Comments
[resolved] [Plugin: WP-Ajaxify-Comments] Unable to Post Comments after Recent Update (6 posts)

  1. kiko0850
    Member
    Posted 2 years ago #

    Today I just noticed that I wasn't able to post a comment using this plugin, it kept getting a JS error provided below (this was on the Rockmelt browser, similar to chrome):

    jquery.min.js:4 Uncaught TypeError: Cannot read property 'style' of undefined

    After further investigation, i noticed that the beginning of the function wpac_showMessage had jQuery('#wpadminbar'), for me I turned this off so this element was not available therefore throwing the above error. What I did was changed

    var top = wpac_options.popupMarginTop + jQuery("#wpadminbar").outerHeight();

    to

    if(jQuery('#wpadminbar').length > 0)
    		var top = wpac_options.popupMarginTop + jQuery("#wpadminbar").outerHeight();
    	else
    		var top = wpac_options.popupMarginTop;

    and now it works fine. Just wanted to give you a heads up just in case other people were wondering about this error.

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

  2. janjonas
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks for your feedback.

    When I'm not logged in the #wpadminbar element is not available. However (even if the element ist not available) in my installation jQuery('#wpadminbar').outerHeight() returns null and does not throw an exception.
    For me this also works in the Rockmelt browser.

    Which jQuery version are you using?
    You find the jQuery version info in the console when you enable the plugin's debug mode or by evaluating jQuery.fn.jquery in the console. To enable the console press F12 to open the browser's developer tools.

    Regards,
    Jan

  3. kiko0850
    Member
    Posted 2 years ago #

    Jan,

    Thanks for the quick response the version of jquery i have is 1.7.2

    Thanks!

    Kiko

  4. janjonas
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Kiko,

    Unfortunately I'm not able to reproduce your problem. I updated to jQuery 1.7.2 and everything works fine; even if the admin panel is not available jQuery("#wpadminbar").outerHeight() returns null.

    I think there is an incompatibility with your theme or any other plugin on your site. Is your blog public available? I would like to find the cause of the problem?

    Regards,
    Jan

  5. kiko0850
    Member
    Posted 2 years ago #

    Jan,

    It's at Yeewiz.com i have reverted my change and turned on debug mode for you.

    Thanks!

    kiko

  6. janjonas
    Member
    Plugin Author

    Posted 2 years ago #

    Hi kiko,

    Thanks for the link. I think I found the problem:
    Your blog includes the waitForImages JavaScript library in version 1.3. I was able to reproduce your problems when including this JavaScript file in version 1.3. After updating to the most recent version 1.4 of the library (https://raw.github.com/alexanderdickson/waitForImages/master/jquery.waitforimages.js) the problem was solved and jQuery("#wpadminbar").outerHeight() returns null.

    I would recommend to either update this script manually or contact the author of the plugin that includes this script in your site and ask him to update to waitForImages 1.4.

    Best regards,
    Jan

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Ajaxify Comments
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.