traelin
  •  traelin
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
2012-06-08T03:07:25Z
I'm getting close to nuking the CollapsibleImage since I've already been making so many danged changes anyways.

This is a two part bug.

1. When enabling CDN to true on the ScriptManager on Forum.cs (using VS11 Beta, which utilizes the latest Microsoft Ajax CDN), the CollapsibleImage on any of the Update Panels on ForumCategoryList.ascx, ForumActiveDiscussion.ascx, and ForumStatistics.ascx throws a PRM (PageRequestManager) error that the key already exists on the page.

2. Disabling the CDN, per the default, avoids the exception in the aforementioned. However, the CollapsibleImages still throw the following when the user is a Guest:

SCRIPT5022: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

Couldn't I just nuke the whole visibility toggling, which is likely what's causing this (along with a possible Guest YafSession issue)? I suppose it'd be ugly but why not just use an HtmlGenericControl as the AttachedControl, cast it in CollapsibleImage.cs, and change its styling to display:none? Not exactly reusable but at least it's a quick fix to get it working?
Sponsor
tha_watcha
2012-06-08T11:14:41Z
I can not reproduce this with VS 2012 rc with yaf source from the repository. Which YAF Version did you use is that a stand alone yaf installation?
UserPostedImage
traelin
  •  traelin
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
2012-06-08T14:33:47Z
Originally Posted by: tha_watcha 

I can not reproduce this with VS 2012 rc with yaf source from the repository. Which YAF Version did you use is that a stand alone yaf installation?


It's 1.9.5.5; however, I took the 1.9.6.1 source for those controls as well as the CollapsibleImage class, and merged them with my build.

I'm thinking if we're going to be toggling the visibility of a control on an Update Panel, it should probably be done after LoadViewState anyways. So the toggling should be done in Page_Load. ViewState is painful and I have had problems in the past with dynamic controls and even toggling visibility of existing controls. I'm going to decode it and see specifically what's going on but my gut tells me it's a typical .Visible issue raised from UpdateAttachedVisibility().

UPDATE: EnableViewState was already false on ForumActiveDiscussion and ForumStatistics, but I decided for testing purposes to up the ante and disable it on the forum page control as well. No dice. At this juncture I'm going to let the issue ride and chalk it up to Beta, because it was a feature that was working fine in VS2010.

UPDATE UPDATE: http://connect.microsoft...-4-5-updatepanel-problem 

Summary: Not a YAF "feature"; rather it's a Microsoft 4.5 "feature".

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved