Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Need explanation: site template (solution) in SharePoint 2010

Posted on 2011-04-19
16
Medium Priority
?
522 Views
Last Modified: 2012-05-11
Here is what I know: when I use a "Save site as template" it is saved as a "solution" in a solution gallery. If it is active I can create new sites based on it.

Here is what I don't know
: is there any connection between the site I created the solution from and the solution and between the solution and new sites created using it?

My observation: My template site that I used to create the solution has columns inherited from the root site and some local columns I created (lookups within that site). I saved it as a template/solution and then created a new site based on it. Everything worked fine, I had those local columns doing lookups within the new site. Later I made some changes to my template site and created a new solution. At this point I decided to deactivate the previous solution. Now when I go to the site created using the old solution local lookup columns are gone from the list of site columns but they still exist in all lists and libraries but do not inherit from the site column anymore.

I hope I am explaining it right. So now the question: What happened? Deactivating it removed the columns? Why? What would be the best practice to create sites based on a template that needs to be updated once in a while...?
0
Comment
Question by:MisUszatek
  • 9
  • 7
16 Comments
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35448038
Hello there

You are correct in your findings and that is correct , deactivating will  remove Site columns.

This is not a problem it is for your own good (please read through).

- > If you use a Site (Web) template, that depends on Site columns, the solution package will include those site column definitions.
- > If you use the same name for your solution , deploy to the same location , you should get your site columns back  ( no guarantee whether they will link back to your web , probably not ).

Best practice , ( and I am not sure what is Microsoft's take on this ,) , this is a problem we have always had with those types.
   1-  Do not use site columns in your site template ,
   2-  Package content types on separate projects .
   3-  Your Site Templates should use your Custom Content Type ( with you own unique ID s) or Default Standards Content type that ship  with Sharepoint.

Deal with your  Site , Content type and webs as  : Database , Schema , Data  in that order.


Best of luck
0
 

Author Comment

by:MisUszatek
ID: 35448115
Thank you for the explanation! You suggest not to use site columns. On my sites I heavily rely on lookups within the site to link different lists and documents to lists. This is where I use my site columns. How can I create/package such lookups to be a part of the template??
0
 
LVL 14

Accepted Solution

by:
GeorgeGergues earned 2000 total points
ID: 35448413
You have to careful about the scope

here is an example :
Web : Contains list and libraries: Keep your lookup data as a Web List.
Site : Contatains Webs  , List and Libraries , site columns Content types : Keep your Look data as Lists,or content types (site columns)
FARM : use the Metadata services (and that is the most recommended ).

If you plan to create sites - Use site level templates
If you plan to create webs - > User Web level templates. etc.


In both cases you can depend on a site columns that has the same ID  .
0
Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

 

Author Comment

by:MisUszatek
ID: 35448612
I am still confused. In my case I use site templates. I have one master site that I update once in a while, then create a site template and create new sites based on it. Everything works ok - I have my site lookups working. Than I need to make some changes so I update my master site and create new site template and new sites are based on it. I thought that I can deactivate previous site templates/solutions at this point not to get confused which one to use from now on. That's when I lost my site columns on existing sites.

Does it mean I need to keep my old site templates/solutions active forever assuming that I might have some sites using it?
0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35448639
the minute you deactive the solution , you will loose the columns

If you keep the new site template with the same name , and  redepoly ( given the columns have the same names )
you should be set.

try it
0
 

Author Comment

by:MisUszatek
ID: 35448668
What do you mean by redeploy - just use 'save as template' with the same name? Or do I need to use Visual Studio (which I don't have and don't know).
0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35448680
save with the same name
0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35448682
you have to remove the old one first
0
 

Author Comment

by:MisUszatek
ID: 35450235
How do I remove the old one first? When I go to solutions the Delete option is grayed out until it is deactivated...
0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35450538
deactivate.
remove solution.
0
 

Author Comment

by:MisUszatek
ID: 35450738
But the moment I do it local columns will be removed from existing sites as we already agreed. Will they come back when the new solution with the same name will be saved?
0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35450956
if you redeploy the same solution the site columns will reappear as long as they maintin the samename and internal IDs.

0
 

Author Comment

by:MisUszatek
ID: 35451145
When I deactivated one of the templates and lost columns I activated it again but the site columns didn't come back. Should it come back in this case as well? I guess I just need to do some testing now.
0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35451171
the site columns will show up on deploy.
0
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35451233
also create at least one site with the new template even though you may not use it .
0
 

Author Comment

by:MisUszatek
ID: 35749985
I am still having issues with this but thank you for your help so far.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

580 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