• Resolved blindpet

    (@blindpet)


    Hi Hector,

    I am using Varnish cache and when I enable ajaxify for Recently the widget is blank. I am viewing in admin mode where varnish caching is disabled so it shouldn’t be varnish. When I use developer mode in Chrome I cannot see any ajax requests either. Can you help me debug this?

    Edit: ajaxify doesn’t work for popular posts either. I do have other plugins using ajax (e.g. Simple share buttons plus) and am using minification. jquery is excluded from minification.

    Recently: jQuery is not defined!
    inline-…7385.js (line 16)
    WordPress Popular Posts: jQuery is not defined!
    inline-…34a1.js (line 16)

    URL for you to test and inspect http://www.htpcguides.com/htpc-wishlist-black-friday-pi-alternatives-2014/

    https://wordpress.org/plugins/recently/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi there!

    It seems both WPP and Recently are unable to find jQuery, a Javascript library required for the Ajaxify widget feature to work.

    Try clearing Varnish’s cache first and see if it solves the problem. If it doesn’t, please let know.

    Thread Starter blindpet

    (@blindpet)

    I did refresh the cache for that specific page. I have done the same for this page

    http://www.htpcguides.com/install-configure-ftp-server-debian-linux-raspberry-pi/

    Next step?

    Plugin Author Hector Cabrera

    (@hcabrera)

    Alright, the problem is that jQuery has been moved to the footer.

    While moving most of the scripts and stylesheets to the footer might not pose a real problem (although I’m not a big fan of that, but that’s a discussion for another day), jQuery is the one library that should always stay in the header section: it’s not that “heavy” and it doesn’t really do much by itself anyways. Any jQuery-dependant scripts that are on mid-page or anywhere before it gets loaded by the browser will break because the jQuery object hasn’t been initialized yet. I’m guessing the Simple Share plugin you mentioned doesn’t rely on jQuery to do Ajax requests which would explain why it doesn’t get affected by having jQuery on the footer of the site.

    TLDR;

    Please, move jQuery back to the header section.

    Thread Starter blindpet

    (@blindpet)

    Perfect, working now. Thank you!

    Plugin Author Hector Cabrera

    (@hcabrera)

    Don’t mention it 🙂

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

The topic ‘Ajaxify showing up blank’ is closed to new replies.