6

I have succeeded to change master page for my site (content) by implementing feature stapling, and now I can see my top navigation in my site as well.

My question is, if after a while I made changes in the master page, CSS files and/or JavaScript files, do the changes affect the old my sites (those were created before changes) or it affect only newly created my sites?

5

If all resources for the branding marked (MasterPages, CSS, JS) as Ghostable or GhostableInLibrary then it looks like they where stored in the content database. The files will be directly loaded from the feature directory.

They are not as long as you don't modify those files directly inside of SharePoint.

If you then update your solution the files will be replaced in the file system and SharePoint references to the new files.

You will find a good explanation of this behaviour on the following blogs: Ghostable and GhostableInLibrary

  • If I understand right from your answer, if I have created my masterpage and other file by a module and mark them as GhostableInLibrary (which I done) then after a while if I change masterpage (or one of other files) will affect the old mys sites.? – Medes Nov 6 '13 at 17:53
  • Exactly it will. Unless someone haven't edit it with SharePoint Designer. Then the master page will be added to the database. You can revert this by restoring the initial version. – Stefan Bauer Nov 6 '13 at 22:34
  • Thank you Stefan, Something that is a little bit fluffy is, when a user clicks on Newsfeed and creates "My site" then the master page must be copied somewhere in that newly created Site Collection. How the new package wsp will affect it? – Medes Nov 7 '13 at 12:11
  • You can use a feature stapling to active a feature and add it in the master page gallery with ghostable in library too. Also need to make sure that the property is set for custom master page and system master page. If you redeploy the package then the mysite will be updated too. – Stefan Bauer Nov 7 '13 at 14:16
2

AFAIK, for CSS and Javascript YES.. The changes will impact (I am considering you are saving CSS and Javascripts in Layouts folder).. But for the MasterPage NO, the masterpage is locked and is not replaced when you deploy the solution..

  • I have used Modules to add masterpage, css and js. and marked as ghostableInLibrary. according your answer the changes in masterpage and redeploy will not affect the old mysites? – Medes Nov 6 '13 at 17:41
  • @Medes what were the results? If any of the answers were true, you should mark as answer! :) – Arsalan Adam Khatri Jan 27 '14 at 5:56
1

Partially yes. It depends on where you files are located.

Your masterpage will be affected by changes since it was deployed by a feature and have a physical location on the server itself. But if someone is risky enough and decides to change the masterpage on their MySite sitecollection via SharePoint Designer making it a ghosted version, then no.

Regarding the CSS and Javascript files, they too will be affected by changes if they are placed in the 15 hive (14 hive for 2010/12 hive for 2007). If they are placed in a style library on users' MySite sitecollection, then no.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.