Beware the UI Feature List
I know that I promised to post about features, but I came across an interesting bug in the MOSS feature user interface that needs to be discussed. I will continue on with the feature posts. Today I was recreating our site using the features I have been working on for the last 2 weeks. In the Sharepoint feature UI you get a list of the installed features in either a site collection or a site with buttons next to them to activate or deactivate the feature. Well I was activating the features when I received a message asking me if I wanted to really deactivate this feature. This did not make sense since the feature was not activated yet. I clicked cancel and went back to the UI for the features. I had clicked on the right feature to activate so I refreshed the page and tried it again. This time the feature activated just fine, so I really didn't think nothing of it.
About 10 minutes later I was doing the same process when I received an error that the content type did not exist. This was odd because the feature I was trying to activate did not do anything with a content type. As a side note right here I need to say that I am not the only one working on this install of Sharepoint. There are three of us working on two separate projects and sharing one 12 hive. This was only a problem once before, but that is another story for later. So I poked into the log files and found that there were some errors for JT features so I mentioned to my colleague Joel that he had some errors in the log. He looked into it and found that the error was his feature but that it was being activated on my site. So I looked into the libraries and lists for my site and sure enough there was his list created on my site.
After more poking around we guessed that the UI for the features list is indexed to an internal list of the installed features. What was happening was I would load the page with the list of features and then Joel would install a new feature that was higher up alphabetically in the list and would push the internal list down one. So on the list I was viewing I would go to activate item 3 and in the internal list it would really be item 4. After we suggested this theory to another colleague, he created a simple test by creating three features that began with z and would create an image that corresponded to the feature id. He then loaded the UI page and installed a feature that began with an a. Sure enough if he went to activate the middle z feature it actually activated the first z feature. So we concluded that you need to (if you have multiple people working on the same 12 hive) always refresh the UI page right before activating a feature to make sure you are activating the right feature or use the command line stsadm command to install and activate the features.
Needless to say this provided some entertainment for us this morning.
Labels: bug, features, MOSS, Sharepoint Server 2007
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home