Rank: Newbie Groups: Member
Joined: 5/8/2012 Posts: 4
|
Hi guys,
Just came across this issue today and not sure if this is a feature limitation or a bug. Basically I have a toolbar with buttons where the image URLs are virtual file paths where I handle these paths in my http module. This works just fine until the Disabled property is set to true on a toolbar item and the EO handler kicks in. As far a I can see the eo_web.ashx takes care of the "image to be disabled" handling and it doesn't like my virtual file path as the image URL. Exception: System.NullReferenceException: Object reference not set to an instance of an object.
Stack trace: EO.Web.Internal.bw.a(HttpResponse A_0, Byte[] A_1, String A_2) +115 EO.Web.Internal.bs.a(az A_0, HttpResponse A_1, Object A_2) +127 EO.Web.Internal.e2.a(jo A_0, Boolean A_1, AsyncCallback A_2, az A_3, HttpResponse A_4, Object A_5) +65 EO.Web.Internal.e2.a(az A_0, Boolean A_1, AsyncCallback A_2) +183 EO.Web.Internal.e2.a(HttpApplication A_0, AsyncCallback A_1) +126 EO.Web.Internal.e6.a(HttpContext A_0, AsyncCallback A_1) +14 EO.Web.Runtime.a(HttpContext A_0, AsyncCallback A_1, Object A_2) +17 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8970356 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
Is it possible to disable the ASHX handler in EO and use a manual workaround or simply debug the issue?
Cheers Ben
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You may want to explicitly add a Url to dynamically generate the disabled image and assign that Url to the ToolBarItem's DisableImageUrl property. When DisableImageUrl is not set, the ToolBar will try to automatically generate a disabled version based on the regular image. However it will use the Url's file extension to determine the MIME type for the disabled image request respond header. That fails when your Url does not have an extension that it recongizes (.jpg, .gif, etc).
Thanks!
|
Rank: Newbie Groups: Member
Joined: 5/8/2012 Posts: 4
|
Thanks for that DisabledImageUrl property, somehow I oberlooked it. Back to the EO image generator - the virtual image path I use does contain the image extension which maps the original's image extension, see below: http://localhost:56618/SiteFiles/VirtualSkinFiles/TOOLBAR_BUTTON_BACK/IRC_STD_backGreen.gif
the file name can be anything the important bit is the TOOLBAR_BUTTON_BACK section (and of course the correct extension) based on which I can lookup the original image file.
Cheers
|
Rank: Newbie Groups: Member
Joined: 5/8/2012 Posts: 4
|
Just an update on the virtual file path. Actually setting the DisabledImageUrl property to the same virtual file path as is the ImageUrl and creating a custom Css class for the DisabledStyle done a great job (creating a background colour with opacity). It is nice to see that there are more than just one way to handle the Disabled behaviour: - built in EO handler - separate image - same image with Css class
Cool ;)
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Thanks for the update. We will look into the extension issue and see what we can find. In the mean time you can use one of the alternative methods for the disabled images.
Thanks!
|