Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Sys.Webforms is undefined
rlangham
#1 Posted : Saturday, 1 May 2010 2:32:18 PM(UTC)
Rank: Member

Joined: 20/08/2009(UTC)
Posts: 13

I am seeing the "Sys.Webforms is undefined" error, and in particular when trying to do "Actions / Edit Album Info", the dialog was not behaving correctly, the Cancel or Save did not work. It was due to some initialization code not called because this error was aborting the JS being loaded.

After some research, I was able to resolve the issue. Where I saw code similar to below...

Code:
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(actionMenuPageLoad);


I would change to..

Code:
    Sys.Application.add_init(AppInit);

    function AppInit(sender) {
        Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(actionMenuPageLoad);
    }


Basically, the AJAX code is not completely initialized yet for some reason for the init code to run. Moving the init code to the AJAX init handler gets around this issue.

I saw this in many of the gs\controls ASCX files, but also in a few CS files.

I would suggest that these places should be changed. What do you think?


rlangham
#2 Posted : Sunday, 2 May 2010 1:07:56 PM(UTC)
Rank: Member

Joined: 20/08/2009(UTC)
Posts: 13

Well, I made the changes above to all places and it did clean up some of the errors that I was getting, but still get the Sys.Webforms is undefined in 2 places, Actionmenu.ascx for actionMenuPageLoad, and GalleryPage.cs for galleryPageLoad.

Not sure why these are still occurring. Still getting some strange behavior with the Next/Prev buttons within an album not changing media objects. So not sure if related to this problem.
rlangham
#3 Posted : Monday, 3 May 2010 3:05:24 AM(UTC)
Rank: Member

Joined: 20/08/2009(UTC)
Posts: 13

I ended up changing all the places that used the Sys.WebForms...addPageLoaded() to use jQuery.ready(). The couple of places that still had errors that I mentioned in the previous post was causing me issues with the Actions menu not appearing. Changing all places from ...

Code:
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(actionMenuPageLoad);


to

Code:
jQuery(document).ready( function() { actionMenuPageLoad(null,null); } )


fixed the Actions menu, and also fixed the issue with the Next/Previous arrows in the album view.

So, all is good now. It would be nice to see these changes in the main code base for future releases.

Thanks
Roger Martin
#4 Posted : Tuesday, 4 May 2010 1:23:57 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,167
Location: Fort Atkinson, WI

Interesting. I became a jquery convert last year and was already planning to replace as much of the MS Ajax stuff as I can with jquery code, including what you suggested. Thanks for confirming that it is the right thing to do.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Jaepetto
#5 Posted : Wednesday, 12 May 2010 3:19:03 AM(UTC)
Rank: Newbie

Joined: 12/05/2010(UTC)
Posts: 2
Location: Lausanne, CHE

Roger Martin wrote:
Interesting. I became a jquery convert last year and was already planning to replace as much of the MS Ajax stuff as I can with jquery code, including what you suggested. Thanks for confirming that it is the right thing to do.


Hi,

I'm also having similar issue with the Action menu:

Code:
Webpage error details
Message: 'Menu1' is undefined
Line: 373
Char: 3
Code: 0


I'm running your product (which I find great!) hosted on DiscountAsp.net.

As I created a Http module that I run on top of the base install, I had to go from 'pipeline' mode to 'classic' mode on the IIS config (otherwise the module does not get executed).

As soon as I change the mode, the Action button disappear. I hope this will give you a lead on what the issue is.

I also ran the exact same application config on W2K3 machine with IIS 6 without issue.

Thanks in advance for your feedback.
Roger Martin
#6 Posted : Wednesday, 12 May 2010 3:45:22 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,167
Location: Fort Atkinson, WI

GSP requires pipeline mode, which is the recommended mode for IIS 7 and later. HTTP modules are fully supported in this mode, so I don't know why your module isn't working. I am not trying to pass the buck here, but my recommendation is to focus on your module, as I don't know of any way to get GSP to work in classic mode.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Jaepetto
#7 Posted : Wednesday, 12 May 2010 5:24:29 AM(UTC)
Rank: Newbie

Joined: 12/05/2010(UTC)
Posts: 2
Location: Lausanne, CHE

Roger Martin wrote:
GSP requires pipeline mode, which is the recommended mode for IIS 7 and later. HTTP modules are fully supported in this mode, so I don't know why your module isn't working. I am not trying to pass the buck here, but my recommendation is to focus on your module, as I don't know of any way to get GSP to work in classic mode.


I know you don't want to pass the buck. I was just wishing it was something that was not requiring refactoring... :-)

Thanks anyway!
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.