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

Notification

Icon
Error

Missing Menu Button
rmcbride@rama.com
#1 Posted : Friday, 15 May 2009 4:12:52 PM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

Sorry to bother you with something that is probably really simple. I got home yesterday and today I eagerly installed the current release of GSP. I create a new instance of my existing web application and removed all users except the Admin user. GSP installed really well and the database looks nice and clean; I went to set the role settings for the Administrator role and also left the Systems Administrators role intact. However when I log in as Admin there is no menu button. So I created a user as a Member, and logged in as the user; also no Menu button.

What might I have missed?

Thanks

Richard
Roger Martin
#2 Posted : Saturday, 16 May 2009 12:57:55 AM(UTC)
Roger Martin

Rank: Administration

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

Are you hooking into an existing membership system? Look in the table gs_Role. There should be a record for the System Administrator role and the AllowAdministerSite column should be set to true. Let me know if this is not the case. Meanwhile, you can manually set this column as a workaround. (Restart IIS to clear the cache.)
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#3 Posted : Saturday, 16 May 2009 2:27:48 AM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

I am using an existing authentication scheme. There is a role called Administrators in the asp.net roles. There is also the GSP role of System Administrators. Below is the gs_Role table results. All columns for Administrators and System Administrators are set to true. The account "Admin" is in the Administrators role.

Thanks

Richard

RoleName FKGalleryId AllowViewAlbumsAndObjects AllowViewOriginalImage AllowAddChildAlbum AllowAddMediaObject AllowEditAlbum AllowEditMediaObject AllowDeleteChildAlbum AllowDeleteMediaObject AllowSynchronize HideWatermark AllowAdministerSite
Administrators 1 1 1 1 1 1 1 1 1 1 1 1
Members 1 0 0 0 0 0 0 0 0 0 0 0
System Administrator 1 1 1 1 1 1 1 1 1 1 1 1
Roger Martin
#4 Posted : Saturday, 16 May 2009 1:12:46 PM(UTC)
Roger Martin

Rank: Administration

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

Well, that looks right. When you log in, are you able to view the media objects? If so, then GSP thinks you are in a role with view permission, so that means at least part of the security system is working, which would lead me to suspect a javascript error in rendering the menu. Are you seeing any javascript errors?

Try navigating directly to a function that requires sys admin permission (e.g. default.aspx?g=admin_general). There is code that kicks you out of the page if you are not in a sys admin role. If it lets you in, that tells us GSP thinks you are in the sys admin role.

The only other thing is if we have conflicting application names in the aspnet_applications table. Can you check this? And verify that both the user and role are associated with the same application.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#5 Posted : Sunday, 17 May 2009 3:31:40 PM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

I can navigate directly to the admin_general page and can make modifications to that page. Therefore GSP seems to think "Admin" is in the Administrator role, which is true. In respect of the aspnet_applications table, there is only one entry - "Gunk", the name of my application. GSP reports the following role, membership and profile data.

Data Providers

Gallery Data
Description: SqlServerGalleryServerProProvider - SQL Server gallery data provider
Application name: Gunk
Membership (users)
Description: Gunk - SQL membership provider.
Application name: Gunk
Roles
Description: Gunk - SQL role provider.
Application name: Gunk
Profile
Description: Gunk - SQL profile provider.
Application name: Gunk

I am not seeing any javascript errors. I will work on this angle tonight. Let me know what you think.

Thanks

Richard
rmcbride@rama.com
#6 Posted : Sunday, 17 May 2009 3:37:55 PM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

There is a javascript error - Line: 468; Error: 'Menu1' is undefined

The code line is: var mnuEditAlbum = Menu1.findItemById("mnuEditAlbum");

Thanks

Richard
rmcbride@rama.com
#7 Posted : Monday, 18 May 2009 9:15:10 AM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

This kind of looks like a ComponentArt problem. Isn't this what you use to create the menu? I wonder if I have missed something either in my web.config or gsp.config related to componentart.

Thanks

Richard
Roger Martin
#8 Posted : Monday, 18 May 2009 9:40:33 AM(UTC)
Roger Martin

Rank: Administration

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

Yes, the menu is done through CA. Check the handler and module sections in web.config. Make sure you are looking at the right sections, depending on whether you are using IIS 5/6 or IIS 7/7.5.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#9 Posted : Monday, 18 May 2009 9:53:58 AM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

Here is the modules and handlers. The problem exists in both iis 6 and 7.

<modules>
<remove name="ScriptModule" />
<remove name="ComponentArtUploadModule" />
<add name="ComponentArtUploadModule" type="ComponentArt.Web.UI.UploadModule, ComponentArt.Web.UI" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<remove name="ComponentArtUpload" />
<remove name="ComponentArtScriptHandler" />
<add name="ComponentArtUpload" path="ComponentArtUploadProgress.axd" type="ComponentArt.Web.UI.UploadProgressHandler, ComponentArt.Web.UI" verb="*" />
<add name="ComponentArtScriptHandler" path="ComponentArtScript.axd" type="ComponentArt.Web.UI.ScriptHandler,ComponentArt.Web.UI" verb="*" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="MSCaptchaImage" path="CaptchaImage.axd" verb="GET" type="MSCaptcha.CaptchaImageHandler, MSCaptcha" preCondition="integratedMode,runtimeVersionv2.0" />
</handlers>

Roger Martin
#10 Posted : Tuesday, 19 May 2009 1:35:01 AM(UTC)
Roger Martin

Rank: Administration

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

That looks right. I am wondering if the javascript is trying to accessing the menu object before CA has instantiated it. I have seen that before with some other CA objects, but not the menu item. But depending on your browser, it is possible.

Let's change the javascript to test for the existence of the menu item. If not ready, wait 1/10 second and try again. Open gs\controls\actionmenu.ascx and replace the script tag at the top with this:

Code:
<script type="text/javascript">
    Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(gsp_actionMenuPageLoad);

    function gsp_actionMenuPageLoad(sender, args)
    {
        gsp_actionMenuConfigControls();
    }

    function gsp_actionMenuConfigControls()
    {
        // If the menu object isn't ready, wait 1/10 second and check again.
        if (typeof (Menu1) === 'undefined')
        {
            setTimeout('gsp_actionMenuConfigControls()', 100);
        }
        else
            gsp_actionMenuPageLoaded();
    }

    function gsp_actionMenuPageLoaded()
    {
        var mnuEditAlbum = Menu1.findItemById("mnuEditAlbum");
        if (window.editAlbumInfo == null)
        {
            mnuEditAlbum.set_enabled(false);
            mnuEditAlbum.set_toolTip("<%= DisabledDueToInsufficientPermissionText %>");
        }
    }
</script>

Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#11 Posted : Tuesday, 19 May 2009 7:55:21 AM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

I tried that and it didn't seem to work.

Sorry.

Richard
rmcbride@rama.com
#12 Posted : Tuesday, 19 May 2009 8:18:59 AM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

Fixed it. As usual it was "loser error", I mean "user error". After all, it made no sense that this would work for everyone except for me. It had to be something in the settings. I took a more careful look at my web.config and realized I had missed the ScriptHandler line in the httpHandlers section.

Sorry for wasting your time with this.

Thanks

Richard


Roger Martin
#13 Posted : Tuesday, 19 May 2009 1:57:47 PM(UTC)
Roger Martin

Rank: Administration

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

Glad you got it. I was running out of ideas...
Roger Martin
Creator and Lead Developer of Gallery Server Pro
bobsts
#14 Posted : Sunday, 14 June 2009 3:57:20 PM(UTC)
Rank: Member

Joined: 19/04/2009(UTC)
Posts: 8
Location: Ohio

I had the same problem on softsyshosting.com and when they enabled the Integrated Pipeline Mode my problem went away and the buttons and menus are now visible and working.

They asked me this:

Additionally, does your website require ASP.NET 2.0 Integrated Pipeline Mode? We have just changed the mode to Integrated Pipeline Mode as some handlers designed for .NET 3.5 run in Integrated Pipeline Mode only.

I guess I should answer them with a YES.

Thanks,
Bob
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.