Note that there are some explanatory texts on larger screens.

plurals
  1. POSharePoint SPWeb.GetList seems to cause infinite loop?
    primarykey
    data
    text
    <p>So, I'm working on a SharePoint 2010 site that I developed, and I am trying to implement content type change propogation. During this process I seem to have found a strange bug. It seems my combination of calling methods in the SharePoint object model causes an infinite loop. You can see the code here (a little too large to post directly here I think): <a href="http://pastebin.com/U0qbLxpS" rel="nofollow">http://pastebin.com/U0qbLxpS</a>. The key line there is on line 13. Leaving that line commented out results in an infinite loop of sub sites (starting at the first one). If I uncomment that line though, things seem to work fine. Does anyone have any experience with this bug or have any advice? Can anyone duplicate this issue for me? I was trying to use <code>SPWeb.GetList("blah")</code> instead of using <code>SPWeb.List["blah"]</code> directly as <code>GetList</code> is the recommended way to get access to a list (according to everything I have read). But this bug is a bit odd and is going to force me to leave a completely unrelated line of code in there (which leaves me feeling a bit strange).</p> <p>My test site structure is this: <a href="http://localhost" rel="nofollow">http://localhost</a> (main site) and <a href="http://localhost/ASubSite" rel="nofollow">http://localhost/ASubSite</a>. The infinite loop happens on <a href="http://localhost/ASubSite" rel="nofollow">http://localhost/ASubSite</a> and just keeps appending /ASubSite to the end and continuing the loop.</p> <p>Thanks for any hope you can offer. If anyone can duplicate this, it would be great. Then maybe I can submit a bug to Microsoft about this. Otherwise, maybe this is just some strange combination of things I am doing combined with my site.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload