I have updated SharePoint from 2010 to 2013.
We build our solutions for 2013.
One of them has master pages.
When we removed the old solution and install new one, some pages complains about not existing master page. When I manually copied this master pages to the 14 hive under proper feature folder (i recreated this manually), page stops complaining.
Looks like SharePoint keeps reference to this master page from 14 hive.
This is my elemets.xml
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="MasterPage" Url="_catalogs/masterpage" RootWebOnly="TRUE">
<File Path="MasterPage\Intranet.master" Url="Intranet.master" Type="GhostableInLibrary" Level="Published" ReplaceContent="True" IgnoreIfAlreadyExists="True" />
<File Path="MasterPage\Application.master" Url="Application.master" Type="GhostableInLibrary" Level="Published" ReplaceContent="True" IgnoreIfAlreadyExists="True"/>
</Module>
</Elements>
In the masterpage gallery (you can access to this menu in your site settings), the value of your masterpage have to be set to 15 for the "column compatible ui version".
This is embarrassing, but I forgot I have to disable and enable the feature with master pages again.
Related
I am trying to figure out how to use a custom Infopath form with a Sharepoint 2010 workflow. I have read about a million tutorials on how to do this, but I always end up receiving a "The workflow template has specified no FormURN for this page." error.
I use a Visual Studio project to deploy the solution. I have a Module containing the .XSN form in a "Forms" folder and of course the Workflow itself.
After tons of googling I think these settings should be correct:
My Form Module def:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="OPF" Url="FormServerTemplates" RootWebOnly="TRUE" xmlns="http://schemas.microsoft.com/sharepoint/">
<File Path="Travel.xsn" Url="Travel.xsn" Type="GhostableInLibrary" />
</Module>
</Elements>
My Workflow def:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Workflow
Name="Godkjenning av timelister"
Description="My SharePoint Workflow"
Id="d92ce465-4fbd-46ee-9e44-ff0320d2bb75"
TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
CodeBesideClass="OPFWorkflowTest2.Godkjenning_av_timelister.Godkjenning_av_timelister"
InstantiationUrl="_layouts/IniWrkflIP.aspx"
CodeBesideAssembly="$assemblyname$">
<Categories/>
<MetaData>
<AssociationCategories>List</AssociationCategories>
<MetaData>
<Instantiation_FormURN>urn:schemas-microsoft-com:office:infopath:Travel:-myXSD-2005-10-21T21-12-27</Instantiation_FormURN>
</MetaData>
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
</Workflow>
</Elements>
My Feature def:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver">
<Properties>
<Property Key="GloballyAvailable" Value="true" />
<Property Key="RegisterForms" Value="Forms\*.xsn" />
</Properties>
</Feature>
I have published the form from Infopath as an "Administrator approved form template". After I deploy the Visual Studio Solution the form is displayed in the "Central Administration -> Manage Form Templates" list and is marked as "Workflow Enabled=Yes". I get the No FormURN error no matter how I use the form in the workflow. For instance if I try to use it with a task.
Additional things I have tried:
- Used both Infopath 2007 and 2010
- Security on Infopath form is "Domain"
- The alternate access path is left empty when publishing the form
- Used two completely separate environments
- Endless combinations of different settings in the XML files
It seems like some people have managed to get this to work, but no matter what I do it doesn't work for me.
Here is a link that discuss this problem with various solutions (that doesnt work for me):
http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010programming/thread/fac26787-1729-46c8-9021-80652b3734c8
Can only list 1 link on Stack Overflow... first post. Typical...
So if there is any Sharepoint experts out there, please help me resolve this problem! This is the kind of thing that makes me question the whole product!
I'm able to see the InfoPath form after associating with VS 2010 workflow, please find below article on my blog to verify publishing InfoPath form and let me know if you need any help to resolve above issue.
http://sumansharepoint.blogspot.com/2008/05/points-to-remenber-when-designing.html
these steps are same for both InfoPath 2007 and 2010 forms.
Please find below my feature.xml and elements.xml files
Workflow.xml
Name="MyWorkflow" -->
List
<Task0_FormURN>urn:schemas-microsoft-com:office:infopath:ApprovalForm:-myXSD-2011-01-13T09-41-32</Task0_FormURN>
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
Feature.xml
I did not see element manifest entry on your feature.xml code, please verify that.
I am developing a sharepoint feature which takes a backup of the site at sitecollection level and at site level whenevar a user tries to delete the site. The feature is working fine without issues for the existing sitecollection and sites when the feature is activated.
To give more picture, i am taking backup through code in events SiteDeleting and WebDeleting events. This events are hooked up using FeatureActivated event. I understand this ensures the event are hooked only up for the existing sites because of my code(i am hooking SiteDeleting and WebDeleting events in FeatureActivated event). After the feature activated, if i create a new site collection/sites the feature is not working(i.e backup is not taken when deleting the site).
I was trying to activate the event for new sites and hence i looked if there will be similar events like sitecreating where i can again hook up the SiteDeleting and WebDeleting events for new sites. But i came to know after some reasearch that there is no sitecreating event which can be used. After bit of googling i found that it can be done through a feature called stapling where we need to create another feature that attaches this feature to the new sites through template name. I have tried installing both the feature(my original and stapling feature) but it never seems to be working...
I am very new to sharepoint development and its taking time for fixing it. It will great if someone can help me to make the feature to work for the new sites as well.. I believe i am doing something wrong in scope parameter of feature.xml..listed below the feature.xml contents.
****SiteDeletFeature (My original Feature)**
Feature.xml
<?xml version="1.0" encoding="utf-8" ?>
<Feature Title="My SharePoint Delete Feature"
Scope ="WebApplication"
ActivateOnDefault="True"
Hidden="false"
Id="DA910034-F270-4932-90D0-05AE2EE13192"
xmlns="http://schemas.microsoft.com/sharepoint/"
ReceiverAssembly="My.Sharepoint.SiteDeleteFeature, Version=1.0.0.0, Culture=neutral, PublicKeyToken=762e98b8afce5f9b"
ReceiverClass="My.Sharepoint.SiteDeleteFeature.DeleteFeatureCallOut">
<ElementManifests>
<ElementManifest Location="Elements.xml"/>
</ElementManifests>
</Feature>
SiteDeleteFeatureStapling
Feature.xml
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
Id="D0495B32-9F78-4142-A456-48B3ECBFFD6C"
ActivateOnDefault="True"
Title="My SharePoint Delete Feature"
Description="My SharePoint Delete Feature"
Version="0.0.0.0"
Scope="Farm">
<ElementManifests>
<ElementManifest Location="FeatureStapling\FeatureStapling.xml" />
</ElementManifests>
</Feature>
FeatureStapling.xml
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<FeatureSiteTemplateAssociation Id="DA910034-F270-4932-90D0-05AE2EE13192" TemplateName="STS#0" />
.
.
.//goes on, i have included all template names
<FeatureSiteTemplateAssociation Id="DA910034-F270-4932-90D0-05AE2EE13192" TemplateName="MyCOMMUNITY" />
</Elements>
I have tried various option in Scope parameter for SiteDeleteFeatureStapling like Web,Site but nothing worked out...
Could some one help me to fix this issue...Thanks in advance!
Regards
Bala
FeatureStapling.xml must have scope = "Farm"
SiteDeletFeature must have scope = "Web"
I need to create a web part page to be used in a SharePoint collection site. Any ideas?
Start with this walk-through:
http://msdn.microsoft.com/en-us/library/ee231546(v=VS.100).aspx
A good overview of developing for SharePoint:
http://msdn.microsoft.com/en-us/library/ee231517(v=VS.100).aspx
Update:
My mistake. Have a look at this post, Adding web page to blank sharepoint site definition it is still relevant for SharePoint 2010. The main difference is that visual studio will take care of creating a number of the files for you (feature, etc). Start by adding a SharePoint 2010 module to your SharePoint project. Part of the module will be a Sample.txt file. Delete this file and add the WebPartPage.aspx from the post I mention. Next edit the elements.xml file to reflect an appropriate name for you module. Then ensure this module is included in one of your features and you should have a simple web part page available to you once the feature is activated
I usually copy default.aspx from 12\TEMPLATE\SiteTemplates\sts into a custom Feature. I can then customize the page if I need different Web Part Zone configurations.
Feature.xml:
<?xml version="1.0" encoding="utf-8"?>
<Feature Id="A94D977C-1F3B-4488-9DD5-88E0A03506B0"
Title="My Sample WebPart Page Feature"
Description=""
Scope="Web"
DefaultResourceFile="core"
Hidden="TRUE"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="Modules.xml" />
<ElementFile Location="Files/default.aspx" />
</ElementManifests>
</Feature>
Modules.xml:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="WebPartPage" Url="" Path="Files">
<File Url="MyPage.aspx" Path="default.aspx">
<View List="$Resources:core,lists_Folder;/MyList" BaseViewID="0" WebPartZoneID="Right" WebPartOrder="1"/>
</File>
</Module>
</Elements>
I have a project that's built on SharePoint Smart Templates.
I don't have a web part, so I deleted the cs file.
Instead all I have is a blank feature.
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
Id="{6447a5a5-c6c7-4aee-b7c5-b7417e30c03f}"
Title="My Content Types"
Description="Contains the Content Types used by My Provided Applications"
Scope="Site"
>
<ElementManifests>
<ElementManifest Location="Manifest.xml"/>
</ElementManifests>
</Feature>
Any idea why this feature won't install?
update
I manually installed the feature using straight copy and stsadm - this worked, so its not the feature code in question, rather the project could be "whacked"
This feature is scoped at site level. Try to see if you have it in Site Settings -> Site Collection Administration -> Site Collection Features.
I just did away with smart templates, obviously I am not smart enough to use them, and have reverted back to normal WSP Builder, and its working great.
I am using the SharePoint extensions 1.1 for Visual Studio 2005 to deploy my website in SharePoint 2007. When you create a new site, there is a new default page with the ContenType: Welcomelinks.... I would like to change this to include my own ContentType and PageLayout in the onet.xml. I am deploying this using Team Definition.
Could someone give me some suggestions, please?
Did you try applying your module to the onet.xml file?
in
<Project...>
<Configurations...>
<configuration...>
<Modules>
Create a module element:
<Module Name="Default"/>
Then in
<Project..>
<Modules>
have something like this for the definition:
<Module Name="Default" Url="" Path="">
<File Url="default.aspx" NavBarHome="True">
</File>
</Module>
I think that will at least put you on the right track. I hope.