Forum:Problem with AJAX RC

Today, the AJAX (auto-refreshing) Recent Changes on two Wikis I contribute for, KHWiki and The Suite Life Wiki, has stopped working entirely.

You will notice that upon load, the checkbox is always unchecked. It should be checked if it was previously, as this is meant to save a cookie on the user's computer and read it when the script loads. Also, when the checkbox is initially ticked, it does not reload the page (which it should). And finally, if left checked, the page does not auto-reload.

Our Wikis' JS files were not modified in the last few days (prior to this happening), nor has the AJAX RC source file been modified since June 6th.

This error has been encountered in Chrome, Firefox, Internet Explorer, and on both Monobook and Oasis, by multiple users. I have cleared my cache and cookies for all Wikis sites, to no avail.

This is also worth mentioning: On Monobook, I get these JavaScript errors: Uncaught ReferenceError: GS_googleAddAdSenseService is not defined (anonymous function)  Special:RecentChanges:431 Uncaught ReferenceError: GA_googleUseIframeRendering is not defined (anonymous function)  Special:RecentChanges:433

On Oasis, there are no JavaScript errors.


 * EDIT: I already contacted Wikia about this; because the AJAXRC is not made by them, they cannot provide support.

Thanks for any help in advance. — 22:30, July 21, 2011 (UTC)


 * AjaxRC is a very simple script, the error here is likely an indication of a larger problem on Wikia's end. AjaxRC works for me on most wikis, although oddly not on the ones you linked.


 * Just checked the Metroid, RuneScape, and Left 4 Dead Wikis. All the same issue. Do you have any that it is currently working fine on? 22:50, July 21, 2011 (UTC)
 * (Edit conflict) You can also add the Mass Effect and Fallout Wikis to this list as I have tried them on both and they failed to update. However I also think it may be an issue with users, but then I honestly don't know what I'm talking about, but I've seen plenty of times where someone has code in their user space, and they don't know that it broke anything. Lancer1289 22:52, July 21, 2011 (UTC)


 * All the Recent Changes AJAX pages seem to be working again. Wonder what fixed it? 00:13, July 22, 2011 (UTC)


 * I fixed it for those importing from the Developers Wiki here. jQuery was updated which changed the behaviour of certain things slightly. So for those not importing, I'd suggest updating from the most recent version on dev. Let me know if there are any problems. Cheers, grunny  :&#126;$ 00:25, July 22, 2011 (UTC)


 * Not sure why, but importing the dev version in WoWWiki didn't work, so I just surgically put your fix into the WoWWiki code and it seems okay now. Importing the dev version screwed up the checkbox perhaps because WoWWiki has a different skin from standard Oasis? -- Fandyllic (talk &middot; contr) 21 Jul 2011 9:14 PM Pacific


 * The skin shouldn't matter as it should still just append to the header. What about the checkbox was screwed up? As WoWWiki currently uses some of the functions in the dev version (setCookie and getCookie) for other things, so when importing from dev, those functions would get defined twice which can cause issues. The ajaxRC function is also being loaded later so when you commented out your custom version it was calling an non-existent function. Also, I've changed the diff link above to a later revision I made to match the way jquery.com suggests to do this in the new release of jQuery, so you might want to change to that :). Cheers, grunny  :&#126;$ 08:11, July 22, 2011 (UTC)


 * Hmm okay. I thought where a function appeared in a chunk of JS didn't matter, but apparently it does. I'll apply your most recent changes and looks for functions with the same name. -- Fandyllic (talk &middot; contr) 22 Jul 2011 10:08 AM Pacific


 * Okay, I decided to import the dev version instead of trying to apply your changes (there were several and I suck at merging code) and it seems to be working. If you have a minute take a look at w:c:wow:MediaWiki:Common.js and see if there are any problems, it would be greatly appreciated. The WoWWiki versions of getCookie and setCookie appeared to be the same, but I commented them out in favor of the imported ones from dev with the AJAX RC code. -- Fandyllic (talk &middot; contr) 22 Jul 2011 10:26 AM Pacific


 * It doesn't matter where a function is defined, but since WoWWiki used a different name for the main function to load, leaving the original onload there was calling a non-existent function :). I made a slight fix to something you commented out, hope you don't mind! :) Cheers, grunny  :&#126;$ 07:32, July 23, 2011 (UTC)