Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter wildmice

    (@wildmice)

    Oops, i forgot to say that this only happens when AO javascript options are enabled.

    Plugin Author Frank Goossens

    (@futtta)

    and did you try to exclude adrotate’s JS from JS optimization?

    frank

    Thread Starter wildmice

    (@wildmice)

    Yes, it works if i exclude the following :

    jquery.js, jquery-migrate.min.js, jquery.adrotate.clicktracker.js

    Since AdRotate uses jquery, i have to exclude that too, and doing so makes it hardly worthwhile use AO at all for JS.

    Plugin Author Frank Goossens

    (@futtta)

    sometimes one cannot do anything but exclude jquery, although alternatively you could also try to just exclude jquery.adrotate.clicktracker.js and then “force JS in head” (which off course also has it’s disadvantages).

    frank

    Thread Starter wildmice

    (@wildmice)

    Well for me that would kind of defeat the purpose. I really don’t want to load JS in the head for performance reasons. That’s what AO is all abou – performance.

    What i’m trying to do is tweak a performance rating that is already at 95% google page rank / 87% y slow, because AO combining files brings the y slow rating up by about 5%.

    So at a certain point i would lose more than i’d gain with AO.

    Plugin Author Frank Goossens

    (@futtta)

    That I understand, but AO just cannot optimize all the JS all the time. Hence the “exclude from optimization”-fields and the other troubleshooting options ??

    frank

    Thread Starter wildmice

    (@wildmice)

    Yeh, i understand. One of my options is to use a different ad rotator (if i can find one). I think it’s a reasonable guess that AdRotate has some JS that is a bit non-standard and perhaps it gets broken when compressed with the package you are using. There wouldn’t likely be much you could do about that.

    Thread Starter wildmice

    (@wildmice)

    Hi again Frank ~

    I’ve been thinking about your statement above that AO cannot optimizae all the JS all the time. While on the surface this makes sense, for me this approach doesn’t work. Here’s why:

    I did indeed exclude the AdRotate files, including jquery, and the site runs fine, compressing whatever other JS files are there. But what happens after i turn this site over to the client and they decide one day to add a plugin that causes problems with AO? It’s unreasonable to expect that they will know what the problem is, and would basically be setting a trap for the unwary novice site admin (i.e. typical client).

    For me the solution would be to have an option where i could instead say which JS files are *included*, so that when someone adds something new there won’t be the risk that AO may break it. To have AO on auto-pilot, optimizing everything, when as you say it *cannot* optimize everything… that’s the problem.

    Personally i am ok with only the excluded files option, but as a developer i cannot turn anything over to a client like that, which means that effectively my use of AO is very limited. That is a pity, because it plays a very important role in performance optimization and i really want to use it in production.

    – shanna

    Plugin Author Frank Goossens

    (@futtta)

    Regarding the more general remark; I understand. What you’re describing is currently not possible, but I’ll put it on the list of things to think about, who knows I’ll add something for developers in a later release.

    Regarding adrotate specifically; are you using the free version from wp.org, or the pro one? I installed the free version, but have not been able to trigger a JS error yet, but it may depend on the version and your settings off course.

    frank

    Thread Starter wildmice

    (@wildmice)

    You can mark this one as resolved. The script in AdRotator is being enqueued without the necessary jquery dependency. I have notified the plugin author.

    It was only working because jquery was fortunately getting loaded before the script executed, but because AO puts everything in one file the script executed before jquery, breaking the script and everything after it.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘AO conflicts with AdRotate’ is closed to new replies.