Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author datafeedr

    (@datafeedrcom)

    Sounds like a conflict with a caching plugin. Try adding &return_javascript=1 to your line.

    echo dfads( 'groups=123&limit=1&return_javascript=1' );

    Thread Starter WCVendors

    (@wcvendors)

    No go! Updated the PHP as you suggested, and only shows the one ad….

    https://imgur.com/do6JECu,ZT1Dkr8#0

    https://imgur.com/do6JECu,ZT1Dkr8#1

    (Settings page, and output, refreshed 20 times, control+reload, different browsers, etc… There are no caching plugins on this site, no W3 or SuperCache or anything like that)

    Plugin Author datafeedr

    (@datafeedrcom)

    What is the exact code you are using in your template file?

    Thread Starter WCVendors

    (@wcvendors)

    echo dfads( ‘groups=123&limit=1&return_javascript=1’ );

    Plugin Author datafeedr

    (@datafeedrcom)

    Please use echo dfads( 'groups=123&limit=1&return_javascript=1&orderby=random' );

    If that doesn’t work, it could mean your MySQL’s ORDER BY RAND() function is disabled.

    Thread Starter WCVendors

    (@wcvendors)

    Thanks for your continued and fast updates. As another plugin developer, I appreciate that and thank you. ??

    Updating the PHP to:
    echo dfads( ‘groups=123&limit=1&return_javascript=1&orderby=random’ );

    Only shows the one ad so far. The webhost for this site is wpengine.com — I’d guarantee that their mysql is configured properly as other features on the site use it (such as displaying random products).

    I will install the plugin on another site not hosted by wpengine.com and see if it works and get back with you.

    Ben

    Thread Starter WCVendors

    (@wcvendors)

    Confirmed: Installed plugin on a server that is not with wpengine.com and the random order works just fine. I’ll have the client report the issue to wpengine to fix.

    Thanks for your help!

    Thread Starter WCVendors

    (@wcvendors)

    For anyone else having this issue with wpengine, here are the steps to fix it.

    yourdomain.com/wp-admin/admin.php?page=wpengine-common

    Enable rand() from within that wpengine specific panel. Note: It will not work on your *staging* site only your *live* site.

    In 15 years I’ve never seen a webhosting company work this way, but, alas, the problem is resolved. I’m still scratching my head a bit. ??

    Ben

    Plugin Author datafeedr

    (@datafeedrcom)

    Hi WCVendors

    Thanks for offering a solution to this issue. Hopefully this will help others who are hosted with WPEngine.

    We’ve seen a lot of our Datafeedr customers have issues with WPEngine and their highly tweaked server config. We’ve actually had to exclude support for WP Engine sites because of their odd handling of mod_rewrite.

    Anyway, glad you got your issue resolved.

    Eric

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Critical Bug: Ad orderby=random not functioning’ is closed to new replies.