Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Service Announcements > 8/24 Release
CyberWolf (Guild Admin) 8/28/2012 11:01 PM EST : RE: 8/24 Release [GPST-36746]
CyberWolf
Posts: 568
Zomgawsh Poster

Opened ticket [GPST-36746]

Users that are using IE 8 and 9 are not able to post on the forums they see what are supposed to be hidden updates to the forums and then are stuck in a read only mode.


TopBottom

Aaron Lewis (Blue Collar) 8/29/2012 1:47 AM EST : RE: 8/24 Release [GPST-36746]
GuildPortal Dev
Aaron Lewis
Posts: 1978
Zomgawsh Poster

First, you've got some race conditions in some of the mods you have installed. For example, the call to $.forumModuleEmotes is being made before the actual script that contains the plugin (/GuildFiles/258012/forum-mod-emote.js) appears on the page, so it's not loaded when the call to it is made. IE is pretty bad about not actually letting all referenced scripts on the page to load before reacting to the $(document).ready() function, but you can run across it in other browsers occasionally, too.

You can get a clearer picture if you hit F12 and navigate around your site. You'll see all kinds of errors being thrown. Mostly, IE will stop executing anything beyond an unhandled error, so the script that hides those forum groups on your forums page doesn't even get a chance to execute.

I've been fiddling with it for about three hours now, but I don't want to make a lot of sweeping changes that will break mod functionality for folks it's not broken for. I will go see if I can wrap your forum hiding script in a function and then call Sys.Application.add_load(function name here) to wrap it up so it doesn't actually execute until every resource on the page (CSS, external Javascript, etc) has fully loaded. Why IE doesn't wait to execute stuff in the $(document).ready() blocks is beyond me, but that's just how MS wrote it.
Aaron Lewis, GuildPortal.com
TopBottom

Aaron Lewis (Blue Collar) 8/29/2012 2:55 AM EST : RE: 8/24 Release [GPST-36746]
GuildPortal Dev
Aaron Lewis
Posts: 1978
Zomgawsh Poster

Alrighty, I updated all of your custom scripts on the forum page and everything's working the way it should now. Also, for all IE users, I've updated the following mods (since they're very popular) to get around the race conditions:
  • Forum Module - Media
  • Forum Module - Popups
  • Forum Module - Emotes
  • Mail Notification
You don't need to update to the latest versions -- I did that for you on your site already. Anyone else reading this who has any of those mods installed should update for sure, though.

While I was mucking around, I added a new mod (but didn't install it on your site). It's called Forum Module - Image / Sig Tamer.
Aaron Lewis, GuildPortal.com
TopBottom

Mottie (MVP) 8/29/2012 7:08 AM EST : RE: 8/24 Release [GPST-36746]
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Wow! Thanks Aaron!
TopBottom

CyberWolf (Guild Admin) 8/29/2012 10:13 AM EST : RE: 8/24 Release [GPST-36746]
CyberWolf
Posts: 568
Zomgawsh Poster

Thank you Sir! 


TopBottom

Aaron Lewis (Blue Collar) 8/29/2012 4:51 PM EST : RE: 8/24 Release [GPST-36746]
GuildPortal Dev
Aaron Lewis
Posts: 1978
Zomgawsh Poster

Mottie said:
Wow! Thanks Aaron!

Hey, sure thing! I think the IE behavior of executing jQuery $(document).ready scripts before the document is actually ready (with all external scripts loaded, etc) is pretty new. Either a change in the browser itself or a result of me keeping GP up-to-date with the latest jQuery and MSAjax APIs (MSAjax is required for a lot of the controls -- though I wish Telerik had written them as server control wrappers around jQuery on the client-side, so that MSAjax wouldn't be necessary at all).

So given the following sample code, the way it was done before:

1.$(document).ready(function() {
2.     // Make the entire page pulsate a few times, to freak 'em out. Aww yeah!
3.     $("body").effect("pulsate", { times:3 }, 450);
4.}

So if you take a look at the changes I made to that code, you'll see I just replaced the $(document).ready wrapper with a new one that contained the execution of the mod's script within a function, followed immediately after by adding the function to MSAjax's queue of functions to run after the page and all resources have loaded. The above code now looks like this:

1.var flashBody = function() {
2.     //<summary>
3.     //Make the entire page pulsate a few times to freak 'em out. Aww yeah!
4.     //</summary>
5.     $("body").effect("pulsate", { times:3 }, 450);
6.}
7.Sys.Application.add_load(flashBody);

So, it basically makes IE/MSAjax operate the way it should operate on doc ready. The good news, aside from the modifications necessary to existing mods and stuff  -- the GuildPortal scripts have had to be modified as well -- is that all of the other more well-behaved browsers will react to Sys.Application.add_load just as if it's $(document).ready.

Anybody familiar with MSAjax might wonder -- why not wrap the code in var pageLoad = function(), since that method gets called on page load correctly (after everything's fully loaded)? Well, thing is, you can only call pageLoad once on a page. After rendering and resource fetching is completed, IE/MSAjax, upon encountering the first pageLoad(), will faithfully execute the code within it, and then happily ignore anything afterwards that is also wrapped in the pageLoad() function. It's counter-intuitive to jQuery's $(document).ready, since with jQuery, you can wrap all the code you want in the ready handler, all over the page, and it will execute all of it.

So for MSAjax, add_load actually queues up all of the functions that have been passed to it throughout the rendering of the page, and then (internally) it calls pageLoad() itself, calling every function it was given. Why pageLoad() couldn't queue up without the developer having to explicitly telling it to is a mystery to me... Maybe if they open-source it I'll fix it for them.


Aaron Lewis, GuildPortal.com
TopBottom

Zelhia (Guild Admin) 8/31/2012 9:22 AM EST : RE: 8/24 Release
Zelhia
Posts: 178
Posts With Wolves

Aaron Lewis said:
pinstripesc said:
I'm not actually seeing any admin buttons now.

Hotfix for that (and other) issues coming in a few minutes!


I don't know what it is that makes my site always have the goofy stuff, but my admin buttons appear...they're just greyed out and not useable.  I'm literally not able to edit ANY content on my site.  I can't even post news to let my members know there's an issue.  I see here that there was a hotfix about the buttons, but that was days ago and I'm still having issues...?
There's always a better way.
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%