Browse by Tags

All Tags » bug (RSS)

Negative item count in document libraries

A few days ago we received a complaint from one of our customers. They found that after deleting all documents from it, a SharePoint document library that serves as the base of a custom application shows negative item count on the All Site Content page. We checked where this value comes from and found it is the ItemCount property of the SPList object. An additional side effect of this strange behavior is that the indexing fails because it cannot cast the negative value to an unsigned integer ( UInt32 ). We could reproduce the behavior using the following code. It assumes that the address of your site is your site is http://moss/site and the name of the document library is CopyTest . The code creates a folder and subfolders, copies it using the CopyTo() method of SPFolder class, and finally deletes the folders. string siteUrl = "http://moss/site"; using (SPSite site = new SPSite(siteUrl)) { using (_web = site.OpenWeb()) { SPList list = _web.Lists["CopyTest"]; Console.WriteLine("Items.Count:{0}, ItemCount:{1}", list.Items.Count, list.ItemCount); Console.WriteLine("Creating 1.0 folder ... "); SPFolder rootFolder = _web.GetFolder("/CopyTest"); SPFolder version1Folder = rootFolder.SubFolders.Add("/CopyTest/1.0"); version1Folder.Update(); list.Update(); Console.WriteLine("OK"); Console.WriteLine("Items.Count:{0}, ItemCount:{1}", list.Items.Count, list.ItemCount); Console.WriteLine("Creating Test1 in...
Posted by SharePoint Blogs
Filed under: ,

EndUserSharePoint.com: Bug or a feature - calendar changes from English to Hebrew?

This comes from Doug Taylor: I my last 2 SharePoint training classes we saw, and were able to replicate the following: User notes that Calendar initially shows time in US West Coast time. Wants to change it. User navigates to Welcome menu, My Settings Read More......( read more ) Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

List does not exist. AccessDenied.aspx. I finally figured it out...

So this is an interesting issue. The problem that I was having to cause this error to come up was using the SPSite.AllWebs[Guid] collection to get the web that I wanted. Well, when the code is run under the impersonation of a user that doesn't have access to all of the webs, they run into the AccessDenied.aspx, List does not exist error. They aren't able to access the allwebs collection that the administrator can. So remember this, use the SPSite.OpenWeb(Guid) function instead! :) It will save you all kinds of trouble. Safe journeys in the world of SharePoint! Posted on SharePoint Blogs Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

SharePoint BUG! Can't keep title of web part on list's form pages!

So if you create a list on a typical site in Sharepoint, you'll notice that the web part contained within does not have a title. Fair enough, wouldn't look great with one, but if you want to add a web part below that one, and keep this web parts title on the screen, you can't! I keep setting its web part properties to "Title only" and it keep switching back to "None" everytime in hit ok. I even tried to trick sharepoint by select apply and then cancel, but that didn't work either! I'm ready to cry, cause I promised my client a scripting solution that utilized the title of the web part as its identifier. If anyone has had any similar solution or found a work around, please let me know! Posted on SharePoint Blogs Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Problem with Custom Web Part! Big issue!

Ok, so I can use this web part and it adds to the list just fine, but when my colleague with the same permissions to the list uses it, she can't get it to add to the list.... I implemented the run with elevated priviledges and used guids instead of using the spcontext.current(heard that negates the elevated priviledges) Any thoughts? private void PopulateDataset() { try { mySite = new SPSite(siteURL); try { myWeb = mySite.OpenWeb(parentURL); } catch { myWeb = mySite.RootWeb; } favList = myWeb.Lists[listName]; NAPWS.Service napService = new global::WPRecordSiteVisits.NAPWS.Service(); oDataSet = napService.SearchClients(); oView.Table = oDataSet.Tables[0]; } catch(Exception e){ lblError.Text += "| PopulateDataSet: " + e.Message; } } private void RecordSiteVisits() { try{ if ((HttpContext.Current.Request.UrlReferrer == null || HttpContext.Current.Request.UrlReferrer.AbsoluteUri.IndexOf(SPContext.Current.Web.Url) == -1) && (HttpContext.Current.Session["Referrer"] == null || HttpContext.Current.Session["Referrer"].ToString().IndexOf(SPContext.Current.Web.Url) == -1)) { if (HttpContext.Current.Session["Referrer"] != null) HttpContext.Current.Session["Referrer"] = SPContext.Current.Web.Url; string pathString = HttpContext.Current.Request.Url.AbsolutePath.ToString(); string strNC_Number = ""; if (pathString.IndexOf("NAP/") != -1) { pathString = pathString.Substring((pathString.IndexOf("NAP/") ...

Custom Web Part Building: State Management Tips and Tricks

When building custom web parts its essential to understand when controls will contain thier values and when they don't and how to keep variables that will contain their values throughout the web part life cycle. Especially if you would like to dynamically load one control based on another controls input. 1. In CreateChildControls, No control will contain a value, not even hidden fields. This eliminates some uses of a common practice of utilizing hidden field to maintain viewstate. 2. ViewState Parameters are great for maintaining values throughout the web part lifecycle. Initialize them in the constructor of a web part to avoid null errors. Initializing a view state parameter: ViewState["parameter1"] = ""; Retrieving a value from view state: string this = ViewState["parameter1"].toString(); 3. If you would like to maintain a web parts state while navigation persists in your website, you can utilize session state variables with the following code: Adding a variable to session state: HttpContext.Current.Session.Add("variablename1", "value1"); Retrieving a variable from session state: writer.Write("'" + HttpContext.Current.Session["variablename1"] + "'"); Posted on SharePoint Blogs Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Known SharePoint Issue: Switching from inherited to custom permissions!

SharePoint has a known issue when you're working with the Security of SharePoint. When you are working with the permission in Sharepoint and want to go back and forth between inherited and custom security, MOSS 2007 gets mad. Breaks the entire portal. So if this happens look for this hotfix: http://support.microsoft.com/kb/937038 . And Safe Journeys in the world of SharePoint! Posted on SharePoint Blogs Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

High Priority ISSUE! MOSS 2007 craziness! Problem!

Okay, I've got to explain this in a way that translates that shear nonsense that happens here. So I search web part taht search oracle for client ids, brings back the client id and sends it to a redirect page. The redirect page has a web part on it that grabs the client id from the query string and either creates a page for the client if none exists and then ships them to the page, or just sends them to the sharepoint page. On the client's page, There's quite a bit of custom functionality through the use of javascript and custom web parts... The client page is also given a query string "NC_NUMBER=346" to tell the page which client it is so the custom webparts can query oracle for some related info about the client. So thats the scenario. And this works perfectly on my computer and a couple other peoples computers, however, when certain end users try to get the client's page, they get a: "List does not exist The page you selected contains a list that does not exist. It may have been deleted by another user. " Now, this is nuts enough just if it happened when going through the redirect page, however, it does this if you attempt to open a new IE window and paste the url with the nc_number parameter. No redirect involved... AND THEN, check this out, if you go to the site, get the error message, and then hit go back to page, it will load the page no worries. What seems to occur on the users page, is the sharepoint pulls some query parameters out...

Discussion Boards Bug

Has anyone else had problems with the discussion boards? My end user will simply modify the view and end up causing problems with the entire list. The the default view will become the home page... And the links won't go to the threaded discussions, they will begin acting like folders... Anyone else had these types of problems? Posted on SharePoint Blogs Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Working on a dynamic site creator

I am currently attempting to use a site creator tool. What I would like to do is expose a web service to an external application that will create a sharepoint site for every client in the external app, delete the site if the client is deleted and create a site based on a custom template if a new client is created. Problems I am having with this process. First, couldn't get sp1 for VS2005 installed, which a tutorial said was needed for my sharepoint web service to work correctly... Error Code: 2755 occurs on the attempt to install.... Second, site creation from site templates seem to have some bugs in them. Got a hotfix to keep webpart configuration information, however still getting a web part connection id already exists when I try to create a site from the template. I use a query filter web part to connect to 3 custom web parts... The client id is passed to a couple of web parts to bring back oracl information from a web service. So the template site creation isn't working. Currently testing in a vpc to see what the issue is... Any input here would be appreciated. Posted on SharePoint Blogs Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Using a Web Service as a Data Source in SharePoint Designer Bug

I can set up a web service as a datasource in Share Point Designer. However, when I attempt to pull that information into a drop down list list form control it does not populate with information. I've tried it several different ways, and paralleled it with a working model using a direct sql connection. I believe this to be an error with SharePoint Designer. Please comment with any related experiences. Posted on SharePoint Blogs Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Site Templates and Content Management Bug

When you attempt to create a site using a site template, everything migrates fine, except if you have any configured web parts on the main default.aspx, they lose their settings. Currently, summary toolbars change to full toolbars, and configured views reset back to defaults. This causes a very large headache for me. Also, this same situation occurs when you attempt to migrate content from say a development environment to a production environment. Wish me luck trying to automate the process of configuring these web part after I create the site off the template, should be fun! Chad Posted on SharePoint Blogs Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Bug in SharePoint Designer Found!

SharePoint Designer is an excellent tool!!! As long as you don't use Web Part Connections!!! SharePoint Designer implants code everytime you open a page with web part connection(s), and then when you save it, the page will error that a connection with connection id ###### already exists... To fix the page, open it in sharepoint designer and remove all child nodes of the webpart manager node. Hope this helps! Posted on SharePoint Blogs Read More...

IE7 does NOT like InfoPath 2003's "Non-Default Printer"

Here I am going to describe a bug that I found recently with InfoPath 2003 and Internet Explorer 7 (IE7). Here is my scenario: an InfoPath form library exists in a SharePoint site created by SharePoint Portal Server 2003 and the form library has an InfoPath form template. If anyone with Internet Explorer 6 (IE6) opens an InfoPath document in the library and print to a printer that is not the default printer, there is no problem. HOWEVER, if you have...