1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / After 4.1 Upgrade - Blog Not loading...

After 4.1 Upgrade - Blog Not loading...

15 posts, 0 answered
  1. Scott
    Scott avatar
    28 posts
    Registered:
    12 Nov 2010
    19 Apr 2011
    Link to this post
    I have many issues that arose after the upgrade. Here is one in particular.

    1.) My blog is no longer working: Error below:
    Compilation Error
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
     
    Compiler Error Message: CS0102: The type 'ASP.sfpageservice_d12edd17_5884_46ab_a1bf_6d1f87e7b8aa_inforetail_aspx' already contains a definition for 'C000'
     
    Source Error:
     
    Line 50: <sf:SearchBox ResultsPageId="c0ac7629-24b6-4c03-a323-216e78d17462" WordsMode="AllWords" SearchIndexPipeId="3ff33c61-5b8b-4b4b-9eab-e0aba8ff779b" ID="T7B35E7F6007"  runat="server">
    Line 51: </sf:SearchBox></asp:Content><asp:Content ContentPlaceHolderID="copyright" runat="Server">
    Line 52: <sf:NewsView ContentViewDisplayMode="Automatic" ID="C000"  runat="server">
    Line 53:  <ControlDefinition ControlDefinitionName="NewsFrontend" UseWorkflow="True" ProviderName=""   runat="server" >
    Line 54:  <Dialogs > </Dialogs > <Views ><sf:ContentViewDetailDefinition  ControlDefinitionName="NewsFrontend" SectionCssClass="" FieldCssClass="" ParentTitleFormat="" Description="" ResourceClassId="NewsResources" ConfigDefinitionPath="newsConfig/contentViewControls/NewsFrontend/views/NewsFrontendDetails" TemplateName="" Title="" TemplatePath="" ShowSections="False" ViewName="NewsFrontendDetails" DisplayMode="Read" TemplateKey=""  runat="server">
     
     
    Source File: /SFPageService/d12edd17-5884-46ab-a1bf-6d1f87e7b8aa_InfoRetail.aspx    Line: 52

  2. Brandon
    Brandon avatar
    50 posts
    Registered:
    30 Jul 2009
    19 Apr 2011
    Link to this post
    seems like a similar experience here but didnt happen to me on the blog page.

    http://www.sitefinity.com/account/support-tickets/view-ticket.aspx?threadid=415673
  3. Jay
    Jay avatar
    51 posts
    Registered:
    16 Jul 2008
    20 Apr 2011
    Link to this post
    I just upgraded and got almost the same issue.  It occurs on a bunch of (but not all) pages within my site.

    Compiler Error Message: CS0102: The type 'ASP.sfpageservice_6392dae1_fdbe_41f2_bd65_7e1324257792_arts_for_all___primary_aspx' already contains a definition for 'C000'

    It's referring to an image control
    <sf:ImageControl ImageId="009013e9-14c8-408a-8b25-ed66d9314af9" ID="C000" CssClass="mainImage"  runat="server">

    Any ideas on how to fix this? 
  4. Brandon
    Brandon avatar
    50 posts
    Registered:
    30 Jul 2009
    20 Apr 2011
    Link to this post
    refer to my post above jay, you have a few components or widget blocks/divs on the page with the same id #. you'll need to make them all unique.
  5. Jay
    Jay avatar
    51 posts
    Registered:
    16 Jul 2008
    20 Apr 2011
    Link to this post
    Thanks Brandon.  You link above is to a support ticket so I couldn't access it.

    I'm going back and updating the IDs for the controls on all the pages now which fixes the problem.  It's just very annoying that these pages all worked fine and then the upgrade randomly broke everything.
  6. Brandon
    Brandon avatar
    50 posts
    Registered:
    30 Jul 2009
    20 Apr 2011
    Link to this post
    oh sorry didnt realize everyone else couldnt see that link.

    yea you'll have to manually go thru and change id # on all widgets/components that are giving this error.

    annoying i know but the only fix.
  7. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    22 Apr 2011
    Link to this post
    Hi Jay, Brandon and Scott

    You are right, the way to fix those errors is by changing the IDs of controls. The problem is that our template parser used to hide these errors before, although they were still a problem. Now that we switched to the virtual path provider, they appear in some places.

    We knew this would happen, but annoying or not, it was going to happen at some point anyway. We just though we'd better release this change early than late.

    Regards,
    Slavo
    the Telerik team

  8. Scott
    Scott  avatar
    12 posts
    Registered:
    20 Apr 2011
    22 Apr 2011
    Link to this post
    So.... the solution is for us to go find each control and give it a new ID? Why wouldn't the update find competing controls  and apply new ID's? 
  9. Shawn Krivjansky
    Shawn Krivjansky avatar
    18 posts
    Registered:
    11 Jan 2010
    27 Apr 2011
    Link to this post
    Moreover, why aren't they right (or unique) in the first place??  I didn't set the IDs for these things.  The designer did.  If I have to go into every control on every page/template and set the IDs myself, why do I need a CMS system?  The whole point is to make my life easier not exponentially more difficult.

    I ran into this issue on the upgrade, and it is fairly ridiculous that I have to handle this kind of thing.  All one asks is that the designer not lay down controls with duplicate IDs...is that so hard?  I can't sit around validating something like this all day long.

    I hope Telerik takes a long hard look at this, because my "upgrade" is a disaster at the moment.  We have 70+ pages.  We have these types of errors on EVERY page!!!  Pretty much anywhere there is a ContentBlock or user control put on a page.  We ABSOLUTELY need a fix for this from Telerik that doesn't involve going into potentially many controls on every page of the entire website to fix.

    If this is the kind of "upgrade" we can look forward to in the future, please.... no more "upgrades".
  10. Scott
    Scott  avatar
    12 posts
    Registered:
    20 Apr 2011
    27 Apr 2011
    Link to this post
    We actually rolled back to 4.0, and the site is working just fine (minus shared content - which in itself should be on the top of the lists as far as "what works" with a CMS system)

  11. Shawn Krivjansky
    Shawn Krivjansky avatar
    18 posts
    Registered:
    11 Jan 2010
    27 Apr 2011
    Link to this post
    I would suggest Telerik make an emergency SP/build to fix this thing.

    It is completely unuseable at the moment.

    I would highly advise nobody take the 4.1 upgrade until the is fixed.
  12. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    03 May 2011
    Link to this post
    Hello Shawn and Scott,

    Here is a code sample that will go through all controls on all pages you have in your site, and change their IDs to random generated GUIDs. This would save you the manual work you need to do. Please back up your database before performing this operation.

    You can run the following in a static ASPX that you include in your site:

    var manager = PageManager.GetManager();
    var propName = "ID";
     
    var controls = manager.GetControls<PageControl>();
    foreach (var cb in controls)
    {
        var idProp = cb.Properties.FirstOrDefault(p => p.Name == propName);
        if (idProp == null)
        {
            idProp = manager.CreateProperty();
            idProp.Name = propName;
            idProp.Value = Guid.NewGuid().ToString();
            cb.Properties.Add(idProp);
        }
    }
     
    var draftControls = manager.GetControls<PageDraftControl>();
    foreach (var cb in draftControls)
    {
        var idProp = cb.Properties.FirstOrDefault(p => p.Name == propName);
        if (idProp == null)
        {
            idProp = manager.CreateProperty();
            idProp.Name = propName;
            idProp.Value = Guid.NewGuid().ToString();
            cb.Properties.Add(idProp);
        }
    }
     
    manager.SaveChanges();


    Regards,
    Slavo
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  13. jocelyn payneau
    jocelyn payneau avatar
    51 posts
    Registered:
    07 Dec 2009
    05 May 2011
    Link to this post
    Hi Slavo,

    After executing your code, I still have the errors.

    Could you please explain what can i do to solve this?

    Regards,
    Jocelyn
  14. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    11 May 2011
    Link to this post
    Hello Shawn Krivjansky,

    There were indeed some problems with the code from my previous reply. Here's a new snippet:

    var manager = PageManager.GetManager();
    var propName = "ID";
    var controlCount = manager.GetControls<PageControl>().Count();
     
    for (int i = 0; i < controlCount; i += 100)
    {
        var controls = manager.GetControls<PageControl>().Skip(i).Take(100).ToList();
        foreach (var cb in controls)
        {
            var idProp = cb.Properties.FirstOrDefault(p => p.Name == propName);
            if (idProp == null)
            {
                idProp = manager.CreateProperty();
                idProp.Name = propName;
                var newId = "ControlPrefix" + Guid.NewGuid().ToString();
                idProp.Value = newId.Replace('-', '_');
                cb.Properties.Add(idProp);
            }
            else
            {
                var newId = "ControlPrefix" + Guid.NewGuid().ToString();
                idProp.Value = newId.Replace('-', '_');
            }
        }
     
        manager.SaveChanges();
    }
     
    controlCount = manager.GetControls<PageDraftControl>().Count();
     
    for (int i = 0; i < controlCount; i += 100)
    {
        var draftControls = manager.GetControls<PageDraftControl>().Skip(i).Take(100).ToList();
        foreach (var cb in draftControls)
        {
            var idProp = cb.Properties.FirstOrDefault(p => p.Name == propName);
            if (idProp == null)
            {
                idProp = manager.CreateProperty();
                idProp.Name = propName;
                var newId = "ControlPrefix" + Guid.NewGuid().ToString();
                idProp.Value = newId.Replace('-', '_');
                cb.Properties.Add(idProp);
            }
            else
            {
                var newId = "ControlPrefix" + Guid.NewGuid().ToString();
                idProp.Value = newId.Replace('-', '_');
            }
        }
     
        manager.SaveChanges();
    }

    This does the same thing, with some fixes. It also commits the changes after each 100 controls, because of problems we experienced when running it on larger databases. It should work in almost all situations. Just make sure to backup your database before executing it.


    All the best,
    Slavo
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  15. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    11 May 2011
    Link to this post
    Hi all,

    We have posted a KB article for this issue, please refer to it for future updates:
    http://www.sitefinity.com/devnet/kb/sitefinity-4-x/duplicate-control-ids-after-upgrading-to-sitefinity-4-1.aspx

    The issue with Sitefinity assigning the same IDs for controls dropped from the toolbox is fixed for 4.1 SP1 and will not be a problem for future projects.

    All the best,
    Slavo
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
15 posts, 0 answered