Solved

Can't remove a feature

Posted on 2013-01-25
9
407 Views
Last Modified: 2013-02-05
I'm doing a tutorial on features. Somehow, I managed to add two features at the site collection level with the same exact display name in the features management window. I don't know how that can possibly happen, but I saw two features with the same name in features management.

I deactivated both features, then went to the features folder and saw one folder that matched the name of both features. I ran an uninstallfeature in stsadm and it succeeded.

Saw only one copy of the feature in features management instead of two. Ran uninstallfeature with the same name again hoping it would uninstall the remaining feature, but it said that feature is already uninstalled.

I removed the feature's folder under the features folder and now I'm still stuck with one remaining feature in the features management that I can actually still activate and deactivate. But I can't find the features folder that this has to be using. There is no folder left in features that matches it's name because I removed it. So how can I get rid of this?
0
Comment
Question by:BobHavertyComh
  • 5
  • 4
9 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 38818922
Hi,
there will be scripting solutions as well, but perhaps you want to try:
http://spm.codeplex.com/

Use the appropriate version.

HTH
Rainer
0
 
LVL 9

Author Comment

by:BobHavertyComh
ID: 38818981
I already have that software, but I can't find anything that resembles the name of the feature. Am I looking in the wrong place within the tool?
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 38819134
Hi,
yes, you would have to go through all features.

I hope you are on SharePoint 2010.
Here is a PowerShell script. Just open SharePoint Management Shell, adjust the output path and run the script.
It will list the GUID, title, the displayname and the root directory (sorted by Title).
Get-SPFeature | Sort @{Expression={$_.GetTitle(1033)}} -Descending:$false | ft @{Label='ID';Width=40;Expression={$_.Id}}, @{Label='Title';Width=80;Expression={$_.GetTitle(1033)}},@{Label='DisplayName';Width=80;Expression={$_.DisplayName}},@{Label='RootDirectory';Width=250;Expression={$_.RootDirectory}} | Out-File -Width 500 "C:\Temp\features.txt"

Open in new window


HTH
Rainer
0
 
LVL 9

Author Comment

by:BobHavertyComh
ID: 38819236
OK, I saw the feature in the output file. Suddenly, I can no longer see the feature in the SP feature manager for activation/deactivation. That's good. Maybe it was merely an IE caching issue.

But I don't understand why this feature even shows up in the output when there is no corresponding folder for it in the features folder. I want to completely wipe this out so that it doesn't even show up on any output.

If it makes any difference, the only way that I can figure out that I could have created two features with the same name is because I gave them two different guids. This was a learning attempt at creating features, and the second copy was a retry of the same thing, most likely with a different guid entered, but everything else the same.
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 38819404
Hi,
that will go very very deep into how SharePoint handles its contents, but I think that SharePoint would not recognize / verify, if you delete the folder, as I assume that he stores the feature information also somewhere in the admin database.
I had even once the issue, that after just replacing a script file in a feature folder, it has been overwritten when the web application has been extended for another authentication.

To get rid of that orphaned feature, I would suggest to retract and remove the complete solution (if this is possible in your environment).

HTH
Rainer
0
 
LVL 9

Author Comment

by:BobHavertyComh
ID: 38819644
Hi Ranier, thanks. By solution, I'm assuming you are not talking about my VS solution. By solution, do you mean the site collection where this feature was deployed? If so, I think I would rather live with the orphan as it doesn't seem to be bothering anything, it just bothers me because the site collection now has an unwanted scar.

As far as your script problem, that might make sense if you edited a core feature, as extending the web app would probably work as sort of an upgrade, overwriting your customizations with their defaults.
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 38820012
Hi,
in my sense
solution == WSP package
(which is in fact most of the times also a VS solution).

And no, it has been a completely custom feature (world map web part with a lot of Javascript) with 2 big Javascript files - where one has been adjusted. The behavior has been like SharePoint extracting the content of the WSP again during the extension of the second web app (so one content database for both, one app with windows for internal user, one with custom login modules for "external").
0
 
LVL 9

Author Comment

by:BobHavertyComh
ID: 38822210
I don't believe that I ever deployed a solution using VS or anything else, I manually deployed a feature by creating feature.xml and elements.xml, copying them to their feature folder under SP root and then running installfeature in stsadm. I know that VS will do all of this stuff for you automatically, but the course I'm watching thinks it's a good idea to do it manually so that you really understand what going on underneath the hood. I really don't have a solution per say and all of this could have been done in notepad. .The feature folder that contained these files is already gone, so I apologize but I still don't understand what you mean because it seems to me that there is no solution to delete. I'm still a novice trying to learn this stuff so i hope you can be patient with me..
0
 
LVL 9

Author Closing Comment

by:BobHavertyComh
ID: 38857721
The accepted solution is correct in a VS solution package situation, but i was performing this manually rather than through VS. I should have run remove -spFeatureFromContentDb, but I saw another article that suggested to carefully remove the offending entries from the features table in the content db if all else failed. Carefully removed the entries manually in SQL Studio, and it seems to have luckily worked so maybe remove -spFeatureFromContentDb luckily does only what I did manually and runs no other operations.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now