Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 17 of 17

Thread: googleindex.aspx no longer works after v9 SP1

  1. #1
    akeller is offline Member
    Join Date
    Dec 2008
    Posts
    78

    Default googleindex.aspx no longer works after v9 SP1

    So I noticed the other day that the googleindex.aspx page no longer renders and gives a run-time error specifying that "The given key was not present in the dictionary. "

    So I contacted tech support which basically said it's a reported and known bug in the software BUT tough luck because we are not giving out patches so you will have to wait for a service pack. Well although I can understand the reasoning for this it still does not fix my issue. So seeing how I have the source code I decided to do some poking around. What I found while debugging is that there is a "The given key was not present in the dictionary." on line 411 in the MultiStoreSiteMap.vb.

    Code:
    Private Shared Function OrganizeEntities(ByVal entities As Dictionary(Of Integer, NestedSiteMapEntity)) As List(Of NestedSiteMapEntity)
    				For Each ent As NestedSiteMapEntity In entities.Values.Where(Function(e) e.ParentEntityID <> 0)
    					Dim _children As New List(Of NestedSiteMapEntity)(entities(ent.ParentEntityID).Children)
    					_children.Add(ent)
    					entities(ent.ParentEntityID).Children = _children.ToArray()
    				Next ent
    				Return New List(Of NestedSiteMapEntity)(entities.Values.Where(Function(e) e.ParentEntityID = 0))
    
    			End Function
    Are any of you having this issue? If you guys have any ideas on how to correct this please share! I know the aspdnsf guys can't send me a patch but maybe they could provide some guidance on how to fix this bug

    Please share your thoughts!
    Last edited by akeller; 01-06-2011 at 08:49 AM.

  2. #2
    deflep is offline Junior Member
    Join Date
    Oct 2007
    Posts
    10

    Default

    I'm getting a redirect to /InvalidRequest.aspx when I navigate to googleindex.asp.

    Alex

  3. #3
    akeller is offline Member
    Join Date
    Dec 2008
    Posts
    78

    Default

    If you go into your admin site and look at your System Log you will usually be able to see what is throwing the error when you navigate that site. If you post the error it might help others to see if they have a solution for you.

  4. #4
    deflep is offline Junior Member
    Join Date
    Oct 2007
    Posts
    10

    Default

    Quote Originally Posted by akeller View Post
    If you go into your admin site and look at your System Log you will usually be able to see what is throwing the error when you navigate that site. If you post the error it might help others to see if they have a solution for you.
    I told support that I didnt see an error for this issue and they told me to make sure that I applied the Admin upgrade.

    I'll try that first and then see if that resolves the issue. I'll post a response either way.

    Thanks!

    Alex

  5. #5
    deanfp is offline Senior Member
    Join Date
    May 2009
    Location
    Sweden
    Posts
    556

    Default

    Yep

    Having the same issue here. I'm going to contact Support as we rely crucially on a sitemap being present.

  6. #6
    peter3827 is offline Senior Member
    Join Date
    Nov 2005
    Posts
    281

    Default

    This is what support said to me.

    "Our developers are still investigating the issue. We've gathered a bit more information on what's going on, but this is still a very rare issue that we can't reproduce locally, and can't even be reproduced the same way reliably on all DBs that we know have the issue. When our developers determine a reliable fix that will resolve this in all instances, we'll release an update for it, but that may end up waiting for the next Service Pack."

  7. #7
    nharkrader is offline Junior Member
    Join Date
    Mar 2010
    Location
    NYC
    Posts
    25

    Default Googleindex.aspx not rendering. Multi-Store 9.0.1.9 SP1

    I am also receiving the same error and redirecting the page to ../InvalidRequest.aspx.
    Meanwhile, as I wait for an SP, my website isn't running properly after purchasing it 12 months ago.

  8. #8
    peter3827 is offline Senior Member
    Join Date
    Nov 2005
    Posts
    281

    Default

    When I set up a test site and add some products the sitemap works. When i move it to a live server is when it breaks.

  9. #9
    akeller is offline Member
    Join Date
    Dec 2008
    Posts
    78

    Default

    There appears to be some confusion in the post.

    @deanfp
    The googleindex issue is separate from the sitemap issue. Yeah I know, its fantastic. Sitemap.aspx AND googleindex.aspx both have issues.

    So I basically had to fix the googleindex.aspx issue myself. I am all for support releasing a single patch for some issues, but sooner rather than later would be appreciated.

    To Fix the googleindex.aspx I basically replaced the following code in the Page_Load method of googleindex.aspx.vb.
    Code:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
                Response.ContentType = "text/xml"
                Response.ContentEncoding = New System.Text.UTF8Encoding()
                Response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>" & vbLf)
    
                Response.Write("<sitemapindex xmlns=""http://www.sitemaps.org/schemas/sitemap/0.9"">" & vbLf)
                Response.Write("<sitemap>")
                Response.Write("<loc>" & AppLogic.GetStoreHTTPLocation(False) & "googletopics.aspx</loc>")
                Response.Write("</sitemap>" & vbLf)
    
                Response.Write(GoogleSiteMap.GetGoogleEntitySiteMap("category"))
                Response.Write(GoogleSiteMap.GetGoogleEntitySiteMap("section"))
                Response.Write(GoogleSiteMap.GetGoogleEntitySiteMap("manufacturer"))
                Response.Write(GoogleSiteMap.GetGoogleEntitySiteMap("section"))
    
                If AppLogic.m_ProductIsML() Then
                    Response.Write(GoogleSiteMap.GetGoogleEntitySiteMap("library"))
                    Response.Write(GoogleSiteMap.GetGoogleEntitySiteMap("genre"))
                    Response.Write(GoogleSiteMap.GetGoogleEntitySiteMap("vector"))
                End If
                Response.Write("</sitemapindex>")
            End Sub
    with

    Code:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
                Response.ContentType = "text/xml"
                Response.ContentEncoding = New System.Text.UTF8Encoding()
                Response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>")
    
                Response.Write("<sitemapindex xmlns=""http://www.sitemaps.org/schemas/sitemap/0.9"">" & vbLf)
                Response.Write("<sitemap>")
                Response.Write("<loc>" & AppLogic.GetStoreHTTPLocation(False) & "googletopics.aspx</loc>")
                Response.Write("</sitemap>")
    
                Response.Write(AppLogic.CategoryEntityHelper.GetEntityGoogleSiteMap(0, Localization.GetWebConfigLocale(), True, True))
                Response.Write(AppLogic.SectionEntityHelper.GetEntityGoogleSiteMap(0, Localization.GetWebConfigLocale(), True, True))
                Response.Write(AppLogic.ManufacturerEntityHelper.GetEntityGoogleSiteMap(0, Localization.GetWebConfigLocale(), True, True))
                Response.Write(AppLogic.DistributorEntityHelper.GetEntityGoogleSiteMap(0, Localization.GetWebConfigLocale(), True, True))
    
                If AppLogic.m_ProductIsML() Then
                    Response.Write(AppLogic.LibraryEntityHelper.GetEntityGoogleSiteMap(0, Localization.GetWebConfigLocale(), True, True))
                    Response.Write(AppLogic.GenreEntityHelper.GetEntityGoogleSiteMap(0, Localization.GetWebConfigLocale(), True, True))
                    Response.Write(AppLogic.VectorEntityHelper.GetEntityGoogleSiteMap(0, Localization.GetWebConfigLocale(), True, True))
                End If
                Response.Write("</sitemapindex>")
    
            End Sub
    Once I did this I was able to navigate to that page and get the proper xml. I submitted it to google and it didn't kick back any errors so I guess it's working?

    As for the sitemap issue, I have been using the sitemap2.aspx. And commented out this line of code in sitemap2.aspx.vb
    Code:
    'SiteMap1.LoadXml(New AspDotNetStorefrontCore.SiteMap().Contents)
    I would hate to think what I would do if I didn't have the source code. I mean we are already at the mercy of tech support but at least with the source you can try to deduce the issue on your own

  10. #10
    nharkrader is offline Junior Member
    Join Date
    Mar 2010
    Location
    NYC
    Posts
    25

    Default Thanks akeller

    Thanks akeller,
    We will try this. We are currently using backed up version to see what version we can use. Tech support seems to have their hands full with other issues. Sounds like there are more issues that time for tech support -- that's never promising!
    Thanks

  11. #11
    peter3827 is offline Senior Member
    Join Date
    Nov 2005
    Posts
    281

    Default

    Thank-you for your help!!

  12. #12
    nharkrader is offline Junior Member
    Join Date
    Mar 2010
    Location
    NYC
    Posts
    25

    Default Sitemap.aspx not showing Resolved, Googleindex.aspx still broken

    I resolved the issue with my ML9.0.1.3 sitemap.aspx and sitemap2.aspx. It appears that there was an issue with html in the category and department descriptions. I had html in the descriptions and once I removed the HTML, the sitemaps worked again. Oh, but I also had to set Show Sections as FALSE in the sitemap from the appconfigs.

    This, however, did not resolve the issue with the googleindex.aspx not working. That is still broke and any constructive feedback from IT, I still have no hopes of this being fixed anytime soon. I currently am thinking that the googleindex was broken when modifying source code.

  13. #13
    jjdunkel is offline Member
    Join Date
    Jan 2006
    Location
    Chicago
    Posts
    78

    Default

    Thank you akeller for posting a solution that works. I'm glad I have the source code too, as I would find this shopping cart absolutely useless without the source in its current state.

  14. #14
    MudDiver is offline Member
    Join Date
    May 2009
    Posts
    44

    Default

    Quote Originally Posted by akeller View Post
    As for the sitemap issue, I have been using the sitemap2.aspx. And commented out this line of code in sitemap2.aspx.vb
    Code:
    'SiteMap1.LoadXml(New AspDotNetStorefrontCore.SiteMap().Contents)
    I would hate to think what I would do if I didn't have the source code. I mean we are already at the mercy of tech support but at least with the source you can try to deduce the issue on your own
    I don't understand, how does commenting out that line solve anything with sitemap2.aspx, it looks to me that if you comment out that line it won't display anything at all. Maybe I'm missing something, I apologize if I am.
    Jason Giles
    IT Manager / Web Services
    WTS Media
    www.wtsmedia.com

  15. #15
    akeller is offline Member
    Join Date
    Dec 2008
    Posts
    78

    Default

    I am sorry that wasn't a clear description of my fix for sitemap2.aspx.

    The Page_Load for sitemap to looks like this out of the box.
    Code:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
                If AppLogic.AppConfigBool("GoNonSecureAgain") Then
                    SkinBase.GoNonSecureAgain()
                End If
                SectionTitle = AppLogic.GetString("sitemap.aspx.1", SkinID, ThisCustomer.LocaleSetting)
                'SiteMap1.LoadXml(New SiteMapComponentArt(EntityHelpers, SkinID, ThisCustomer).Contents)
                SiteMap1.LoadXml(New AspDotNetStorefrontCore.SiteMap().Contents)
            End Sub
    The line commented out is the way the sitemap was constructed in Version 8. The line below it is the way the sitemap is constructed in Version 9.

    When you run the sitemap like this you get the runtime error of "The given key was not present in the dictionary." So I simply commented out the Version 9 LoadXML() call and used the version 8.

    So my Page_Load now looks like this.
    Code:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
                If AppLogic.AppConfigBool("GoNonSecureAgain") Then
                    SkinBase.GoNonSecureAgain()
                End If
                SectionTitle = AppLogic.GetString("sitemap.aspx.1", SkinID, ThisCustomer.LocaleSetting)
                SiteMap1.LoadXml(New SiteMapComponentArt(EntityHelpers, SkinID, ThisCustomer).Contents)
                'SiteMap1.LoadXml(New AspDotNetStorefrontCore.SiteMap().Contents)
            End Sub
    That probably makes a little more sense because if you just commented out that line without adding the Version 8 code it wouldn't load anything indeed!

    I hope that clarifies what I did.

  16. #16
    deanfp is offline Senior Member
    Join Date
    May 2009
    Location
    Sweden
    Posts
    556

    Default

    Thanks for the tip. Tried this and played with commenting out other lines but still does not work with MS.

    Hopefully V9.1 will have a fix.

  17. #17
    AspDotNetStorefront Staff - Erik is offline Senior Member
    Join Date
    Nov 2010
    Location
    Ashland, OR
    Posts
    168

    Default sitemap2, sitemap, googleindex key not found in the dictionary

    Hello,
    We have been able to easily reproduce this issue by simply unpublishing an entity (Category, Manufacturer, Department) that still has published children.

    Since this is very easy to do, it is the cause (although not the source) for the majority of users. The other not so typical scenario is if an entity has a parentid that does not exist. This usually only occurs from tinkering in the db directly.

    So to summarize: Unpublished Entities cannot have published child entities. Entities cannot have a non-existent parent entity.

    There may be other scenarios, but I have not yet run into them. Hope this helps!
    Erik Sutton
    AspDotNetStorefront Technical Support