After being asked to create a new custom SharePoint 2007 Theme on an environment with three front-end servers for an internal project, I soon noticed (post deployment) that the Add/Remove items changes in the SPThemes.xml file performed by the FeatureReciever were not replicated propertly to all of the web front-end servers. After some investigation I found that within the FeatureReciever code I needed to execute the AddThemeItem/RemoveThemeItem function calls from inside the FeatureInstalled/FeatureUninstalling events rather than the FeatureActivated/FeatureDeactivating events.
This is because in a SharePoint farm with multiple servers, the FeatureActivated/FeatureDeactivating event only gets fired on a single server on the farm!
By putting the AddThemeItem/RemoveThemeItem function calls in the FeatureInstalled/FeatureUninstalling events instead, the code will get fired on every server in the farm.
Vimal Naran – Senior Developer