Showing posts with label SharePoint 2010 - Bugs. Show all posts
Showing posts with label SharePoint 2010 - Bugs. Show all posts

Thursday, June 6, 2013

0x8107058a Feature XXX for list template ’10005′ is not installed in this farm. The operation could not be completed.

Hi all,

I was looking for a solution which provides Room Booking System where users could choose a specified room, date and time. Furthermore, the solution prevent double booking if some other user books the same room at the same time.

I looked for some third party solutions (Infowise Soltions ($2999), Room Manager ($1490)  and they were quite good. But they provided some extra functionality such as color code within the SharePoint Calendar that was not required by our organization. After, further research I found a free Codeplex solution: SPResourceBooking. I tried the solution on my demo machine and somehow messed up during the activating on SharePoint 2010 environment.

I got following bug:

Bug! 


Error

<nativehr>0x8107058a</nativehr><nativestack></nativestack>Feature XXX for list template ’10005′ is not installed in this farm.  The operation could not be completed. 

As we know that COM objects errors are quite tricky to decode. I discovered that a few users have same issue (NOT with this CodePlex solution) but in general. I downloaded the source code of the this WSP and found they use Site Template to make it work.

In my previous blog post, I had some kind of issue where I had some list which didn't work and I removed using STSADM command line to remove this list. Thus, I tried to attempt the in this scenario.

FIX:

I used STSADM command. The syntax is:

                    stsadm.exe -o forcedeletelist -url <url>

For e.g. this "Resources" was somehow got corrupted and just fire up this command.
stsadm -o forcedeletelist -url http://sp2010/KWSResources as illustrated below
    

Remove the KWSResourceBooking.wsp from the Solution Store, and redeploy again. It worked fine me at the end.

I hope it helps someone.

cheers,
--aaroh  

Sunday, February 3, 2013

The column name you have entered is already in use or reserved. Choose another name

Hi All,

Scenario: 

I was working for a business requirement where an "Event" has to be used and year, status are required including other fields. Furthermore The "Event" has to used in nearly 8-10 places across sites as well. Therefore I decided to design a site content type for this business requirement so that it can be used for all 8-10 sites. I created a new "Site Content Type", create a new group as "Custom Events"  as illustrated below:



Navigated to Site Actions >> Site Settings >> Site content types >> Custom Events as illustrated below

Clicked on "Events" and create a new site column "Year", column type is "Choice" Field Type and entered the choices

Created a New group named "Events"


and clicked on OK button. 

Issue: 

I bumped into an error: 

Error: The column name that you entered is already in use or reserved. Choose another name
I researched and found that this field "Year" (or Status) field belongs to the "_Hidden" group in the SharePoint Object Model MSDN and thus its not shown up SharePoint User Interface. The business doesn't want to deal with any SharePoint custom development and strictly using SharePoint out of the box features. My options were limited.

Fix: 

Step1: Navigate to the Site Actions >> Site Settings >> Site content types >> Custom Events >> Events (Content Type)

Step2: In the "Events" Content Type, from the "Add from new site column" hyperlink, "Open in new tab" option as shown below:



Step3: Type in the "Year" (which belongs to _Hidden Group)



Step4: On the browser type in following Javascript: 
javascript:g_FieldName={};alert('Successfully cleared forbidden columns'); 


I have to firstly run the javascript mentioned above and hit enter to get the javascript alert. 

Click the "OK" button. 


Step5: I followed the similar steps for "Status" field as well


Step5: On the browser type in following Javascript: 
javascript:g_FieldName={};alert('Successfully cleared forbidden columns'); 


Click the "OK" button.

A new Custom Content Type with our own Year and Status could be defined on this manner.


I hope it helps.

References:
1) SPList.Hidden property
2) Paul Galvin Blog 
3) Jack's Blog 

Sunday, February 12, 2012

How to: Display SharePoint 2010 groups and users in a web part

Hi all,

Working with Visual Studio 2010 and SharePoint 2010 programming is indeed fun. As we know that Visual Studio 2010 is first class tool for developing SharePoint project templates. In my previous blog post Display SharePoint groups and users in a custom application page. I tried same project (SharePoint 2007) to SharePoint 2010 but faced some issue with SP 2010 and VS 2010.

In my previous blog entry I used (SharePoint 2007): 
  • Publishing features 
  • Custom Application page
  • A user control and application page will host this user control. 
I followed the same steps but I ran into errors.

Firstly, I tried to create a custom application page (which I created in my previous post ) but it gave following Error:
The dynamicmasterpagefile attribute on the page directive is not allowed in this page.

Thus, I found some solutions over the Internet and discovered an interesting written by Geoff Webber  and I created MasterPage in SharePoint and tried to deployed my custom application page but it failed with exactly same error mentioned above.    

Then I tried remove "autoeventwireup" attribute but yet again I got another error: 
The attribute "autoeventwireup" is not allowed in this page.

  I dug into MSDN documentation and found an article from Kirk Evans titled Creating a SharePoint Site Page With Code-Behind Using Visual Studio 2010 I tried using his code. However, he explained more into Site Pages and modifying web.config by using SPWebConfigModification class and I was not convinced because he used site pages and modified web.config and I knew that there should be easier option. Thus, I used to own way and used developed a visual web part and did not use publishing features. There is the walk through: 

Step1: 
Created a new Visual Studio 2010 project >> SharePoint 2010 (Visual C#) template >> chose "Empty SharePoint Project" >> Name: SP2010DisplayGroupsUsers.         

Step2:
The wizard prompts to specify the site  and security level for debugging


Step3: 
Right click on the project >> Add >> New Item >> choose "Visual Web Part" and name it "ShowsGroupsUsers"

Visual Studio 2010 creates a new visual web part associated with a feature. We have to rename the feature so that its more meaningful.


Step 4: 
We drag the TreeView ASP.NET control onto our visual web part, use smart tag to use "Contacts" (AutoFormat) and set appropriate properties such as widh and ID of the tree view control.


Step5: 
Whenever we develop a custom solution such as web part, list with content type or workflow, its best practice also remove via an event receiver so that unnecessary artifacts are removed from the SharePoint server. I have seen people using custom solution but during the deactivation of the feature, the SharePoint root (14 hive) still exists. Thus, we should always clean up the code for deactivation as well.

I am using visual web part and I have to obtain an instance of the "Web Part Gallery". This web part gallery is in fact a list. Therefore, I get used  "GetCatalog" method and supplied WebPartCatalog to get all the web parts that are hosted for the current site collection.   
Then create a SPQuery instance and use CAML query to specific web part which we are creating "ShowsGroupsUsers" as follows:

Event Receiver Feature Activation 


We do the code for feature deactivating and this time we will remove web part item from the site collection. 

Event Receiver Feature Deactivation
 
Step6: 
What I found slightly annoying while developing Visual Studio 2010 SharePoint projects, when we develop a custom solution and tried to deploy to SharePoint, the features are activated automatically. Thus, I created a custom deployment by clicking on the project, right click on the "Properties", going on SharePoint tab, create a "New" deployment configuration and selected only till "Add Solution" and choose "Active Deployment Configuration" our new "Custom Deployment". 

Step7: 
We create images folder for your web part. VS2010 provides "Mapped" folder when we create any new artifact. 

We use 'SharePoint "Images" mapped folder' for our project. It will VS2010 will then create a sperate folder for our project. 
Step8:
We will then deploy our custom solution to SharePoint server using our own "Custom Deployment"

Now, we go to "Site Collection Features" and activate our new web part. 

Again, CKSDev helps to attach all the IIS worker processes (w3p). 

Step8: 
We can test our web part inserting our new web part. 


The web part shows all groups and members for specific site collection.  

We can also check if the web part is there in web part gallery: 


Now, comes an important aspect. If at all business users wants to deactivate this feature. We must remove this web part from this site collection by clicking the "Deactivating" feature. After feature is deactivated we must check if the web part is there in web part gallery. It should not. 


I need to point out few things here:
  1. I have configured Active Directory, add few dummy users and used User Profile Service Application (detailed in my earlier blog: Configure User Profile Service Application in Sharepoint 2010 ) and pulled AD users in SharePoint 2010. So, all the users actually come from Active Directory.      
  2. There are third party components which, I think, does same thing which I have written in this blog entry. One of the products is Qdabra Active Directory Web Service  and product leverages InfoPath to pull the information from AD onto SharePoint. They have dedicated support but the product comes with hefty price.
If you feel that it helped you in anyway, please comment.
Happy programming!

Cheers.
--aaroh

Download the source code here.

Sunday, October 10, 2010

Error occurred in deployment of step ‘Activate Features’: the field with ID defined in feature was found in the current site collection or in a sub site.

Hi all,

While developing a custom content type, custom list definition based on the custom content type, I got an error while deploying to the SharePoint 2010 server.

Error:
‘Error occurred in deployment of step ‘Activate Features’: the field with ID <New GUID> defined in feature <FeatureGUID> was found in the current site collection or in a sub site.

Fix: 

Its a known issue and there couple of workarounds to fix this issue. 

Workaround 1:• Right click on Project node in Solution explorer and click "Retract".
• Close VS. This will flush the stale cache.
• Open the project in a new instance of VS and re-deploy the solution.

Workaround 2:If closing VS after retract doesn't solve the problem then a longer workaround is:

• Redeploy the project -> This will show an error during feature activation.
• Go to "Manage Site Features" under "Site Settings" in SharePoint UI in the browser.
• Activate and then Deactivate the deployed feature which contains the Field.
• Retract the Solution in VS i.e. right click on the Project node and click "Retract".
• Close VS. This will flush the stale cache.
• Open the project in a new instance of VS and re-deploy the solution.

Please refer to the MSDN KB article.

Cheers, 
--aaroh 

Saturday, February 27, 2010

Issue with Visual Studio 2010 RC intellisense

Hi all,


Please refer to this post where in developers are facing problem including me in VS2010 RC's intellisense.  In VS 2010 beta2, there is intellisense for SharePoint 2010. For e.g. if you create a client model such as post in my blog and if you use VS2010 Beta2, there is no problem. If you upgrade to VS2010 RC, I found a small issue in Visual studio's intellisense.


Please see the screen shot where I am developing a client model and want to use <SharePoint:ScriptLink ...>. Surprisingly, there was no intellisense.





But when you type further such as ID, runat attibutes, the intellisense kicks in and you can use intellisense for other attributes.




Looks a bug in VS2010 RC.


Cheers,
--aaroh

Saturday, February 13, 2010

Getting started with SharePoint 2010

Hi All, 

Last week I bought a new PC only for SharePoint 2010 development. It has a pretty high-end configuration specifications: Intel i7-920 processor, Windows 7 home premium (64 bit)10 GB DDR 3 RAM, 1 TB HDD, Nvidia GeForce GT230 Graphics Card (1.5GB Dedicated RAM)

The PC has incredible performance. I also downloaded VMware player and got a SharePoint VM from one of my colleagues. Microsoft has given a lot of free sources for developer community and it could be find here. It has lot of hands-on labs, solutions, lot of videos, slide-shows etc. 

Today, I watched Ted Pattison's SharePoint 2010 Development Primer and created a new SharePoint 2010 solution. Its just a simple console application. There are few things to be noted here: 

  1. SharePoint 2010 is 64 bit. Therefore developers has to take note of that.
  2. SharePoint 2010 is based on .NET framework 3.5. That's why if use .NET FX 4.0 you are bound to get an error. 
Ted Pattison created a console application where he a SPSite and SPWeb for a SharePoint 2010 site and displays all the lists in the web. But he got an error "File not found." So, he went to properties, navigated to "Build" tab and in the "Platform target" he switched to "Any CPU". I did exact steps. For him it worked perfectly well but I got an error.  

"The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)"

I don't know what was wrong. I again went to solution properties,  navigated to "Application" tab and found that "Target framework" was pointing to ".NET Framework 4 client profile". Obviously, SharePoint 2010 does not support .Net FX 4.0. I switched to .NET framework 3.5. 

Voila!

It worked beautifully!  
My SharePoint 2010 journey has just started! 

Cheers, 
--aaroh

Low Code Reimagined with AI + Copilot Pitch Deck - Copy Copilot day (Virtual) - 2023

 Hi All,  I presneded a session at Pune UG on Low Code Reimagined with AI + Copilot Pitch Deck.  Video is at this address  https://www.youtu...