• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 473
  • Last Modified:

Can't remove a feature

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
BobHavertyComh
Asked:
BobHavertyComh
  • 5
  • 4
1 Solution
 
Rainer JeschorCommented:
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
 
BobHavertyComhAuthor Commented:
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
 
Rainer JeschorCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
BobHavertyComhAuthor Commented:
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
 
Rainer JeschorCommented:
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
 
BobHavertyComhAuthor Commented:
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
 
Rainer JeschorCommented:
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
 
BobHavertyComhAuthor Commented:
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
 
BobHavertyComhAuthor Commented:
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

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now