Raja Ayyapusetty, Author at Perficient Blogs https://blogs.perficient.com/author/rayya/ Expert Digital Insights Wed, 22 Jan 2014 17:45:46 +0000 en-US hourly 1 https://blogs.perficient.com/files/favicon-194x194-1-150x150.png Raja Ayyapusetty, Author at Perficient Blogs https://blogs.perficient.com/author/rayya/ 32 32 30508587 Developing Rich UI Applications with Display Templates https://blogs.perficient.com/2014/01/22/developing-rich-ui-applications-with-display-templates-2/ https://blogs.perficient.com/2014/01/22/developing-rich-ui-applications-with-display-templates-2/#respond Wed, 22 Jan 2014 17:45:46 +0000 http://blogs.perficient.com/microsoft/?p=20813

As part of working on two SharePoint 2013 WCM projects I’ve had the opportunity to develop a lot of Display Templates. At first, Display Templates development sounded more painful than it should be, but as I spent more time I found a few techniques to easily build rich interfaces. In this post I’ll go over two techniques that we used extensively: 1) Execute custom code after each search result is processed 2) Execute custom code after all search results are processed.

  1. After each search result:Developing Rich UI Applications with Display Templates

    Each search result is processed in an item template where you build the HTML for that particular search result. I was working on a simple requirement to apply a specific CSS class on the last item of the search results. My requirement was to show search results in a

      element so each search result is a

    • element, and I have to put a specific CSS class on the last
    • element. I couldn’t find a way to get the index of the current item, so, can’t put a class name on
    • conditionally. My first thought was to declare a variable in Control Display Template and increment it Item Display Template and use it to check the index of current search result. But that doesn’t work because every Item Display Template invocation is a separate JavaScript function call and any variable manipulation in the function call won’t be preserved.

    ‘ctx’ object drives the client-side processing of Content By Search (CBS) web part. It has all the search results being processed, and ton of other useful information. Best way to learn about it is open browser’s Dev tools, put ‘ctx’ object in the watch window and go through its different properties.
    For my scenario, approach that worked for me is to put a custom variable in the ‘ctx’ object and increment it after each item template is processed.
    Here are the steps to implement this:

    1. Initialize my variable in Control Display Template.
    2. ‘ctx’ object has a property called ‘ItemRenderWrapper’. This points to a function that gets called after each Item Template is processed. Assign a custom function to this property and increment above custom variable in this function.
    3. If the counter is equal to the number of items in the search result, apply conditional CSS here.

    Here’s the code summary:

    ‘ctx’ object is created in Control Display Template and is available during Item Display Template processing, so another way of doing this is initialize the custom variable in Control Display Template and do all the conditional logic in Item Display Template.

  2. After all search results:

    Another useful property in ‘ctx’ is ‘OnPostRender’. This property takes a pointer to a function and Display Template processing pipeline will execute that function after all the Item Template calls are finished. If you want to initialize a jQuery plugin on the HTML generated by the Display Template, this is where you’d do that. ‘OnPostRender’. You can also initialize ‘OnPostRender’ as an array, push your JavaScript functions to the array, and those functions will be executed in that order. Here’s an example:
    ctx.OnPostRender = [];

ctx.OnPostRender.push(function(){

if ($(“#slideshow”).exists()) {

$(“#slideshow”).wtRotator();

}

});

Another way of doing the same is using ‘AddPostRenderCallback’. Here’s an example:

AddPostRenderCallback(ctx, function(){

if ($(“#slideshow”).exists()) {

$(“#slideshow”).wtRotator();

}

});

Display Templates development does take some getting used to, but as you can see, using the above two ways it is possible to build rich UI applications using Display Templates.

]]>
https://blogs.perficient.com/2014/01/22/developing-rich-ui-applications-with-display-templates-2/feed/ 0 224552
Enable scope picker for Search Input Box in SharePoint 2010 https://blogs.perficient.com/2009/12/24/enable-scope-picker-for-search-input-box-in-sharepoint-2010/ https://blogs.perficient.com/2009/12/24/enable-scope-picker-for-search-input-box-in-sharepoint-2010/#respond Thu, 24 Dec 2009 16:10:20 +0000 http://blogs.pointbridge.com/Blogs/ayyapusetty_raja/Pages/Post.aspx?_ID=19
To enable the scope picker next to search input box I started off with the 2007 approach of writing a custom feature and giving it higher priority as mentioned in this MSDN article. Even after setting the search control’s DropDownModeEx property to “ShowDD” it wasn’t displaying the dropdown. After some struggle I stumbled up on the search settings option under site collection settings. As shown in the screenshot below, it gives us an option to show or hide the scope picker next to the search input box.
SP2010_ScopePicker
Hope this helps.
]]>
https://blogs.perficient.com/2009/12/24/enable-scope-picker-for-search-input-box-in-sharepoint-2010/feed/ 0 223490
Comparing SharePoint 2007 and 2010 Content Databases https://blogs.perficient.com/2009/10/18/comparing-sharepoint-2007-and-2010-content-databases/ https://blogs.perficient.com/2009/10/18/comparing-sharepoint-2007-and-2010-content-databases/#respond Mon, 19 Oct 2009 01:32:36 +0000 http://blogs.pointbridge.com/Blogs/2010wave/Pages/Post.aspx?_ID=35

It’s no secret that you are not supposed to touch SharePoint databases but there certainly are some scenarios which would tempt you to at least read from them; mostly for performance reasons. For example, if you want to do some kind of reporting with data pulled from lists spread over 15K sites, it’s not a terrible sin to read from content database directly. So, if in any shape or form your code is interacting with database directly you have some work to do to make it work in 2010. It shouldn’t be a surprise that SQL boys in Redmond campus have tweaked the SharePoint 2010 databases.

I did a SQL compare of 2007 and 2010 content databases and here’s my findings:

Identical Tables (9):

  • BuildDependencies
  • DiskWarningDate
  • EventBatches
  • GroupMembership
  • HT_Settings
  • RoleAssignment
  • SiteVersions
  • WebMembers
  • WelcomeName

New Tables (16):

  • AllFileFragments
  • AllListsAux
  • AllListsPlus
  • AllListUniqueFields
  • AllLookupRelationships
  • AllWebParts
  • CustomActions
  • Resources
  • SharedAccessRequests
  • SiteDeletion
  • SolutionResourceUsageDaily
  • SolutionResourceUsageDailyOrdinal
  • SolutionResourceUsageLog
  • SolutionResourceUsageWindowed
  • Solutions
  • WebsPlus

Dropped Tables (4):

  • Categories
  • Image0x
  • WebCat
  • WebParts

Rest of the tables, 78 of them, have their schema modified. So, as you can see, pretty much every table has been re-done. Start making your changes to get ready for 2010. Good times.

]]>
https://blogs.perficient.com/2009/10/18/comparing-sharepoint-2007-and-2010-content-databases/feed/ 0 223528
SharePoint 2010 – Sandbox Solutions https://blogs.perficient.com/2009/10/18/sharepoint-2010-sandbox-solutions/ https://blogs.perficient.com/2009/10/18/sharepoint-2010-sandbox-solutions/#respond Mon, 19 Oct 2009 01:26:13 +0000 http://blogs.pointbridge.com/Blogs/2010wave/Pages/Post.aspx?_ID=34

SharePoint 2010 introduces a new way of adding custom dev to SharePoint: Sandbox solutions, also called User Solutions. Solution deployment we are all used to in SharePoint 2007 still exists in SP2010 but those solutions will be called Farm solutions. Sandbox solutions are scoped to site collection and each site collection has its own gallery of these solutions which can be found in the site settings page.

When you create a Visual Studio project using any of the SP 2010 templates it asks us what type of solution it is going to be, as shown in this picture:

VisualStudio1

This selection can be changed later from the Visual Studio project properties:

image

Visual Studio 2010 gives visual tools to build the deployment package so long gone are the days of editing DDF and manifest files. After building the WSP you can upload it to the solution gallery just like you would upload a master page to its gallery. Select the solution you uploaded and the context sensitive ribbon gives you the option to activate the solution.

SolutionsGallery

To have your solution working make sure you have this windows service running: Windows SharePoint Services User Code Host V4.

Sandbox solutions have their own advantages but also some limitations. Best part is you don’t have to deploy the solution from the server which means no server reset. You can do as many deployments as you want – every developer’s dream 🙂 And, you can test your customizations in a test site collection on the production servers before applying it to the real sites. I personally am very excited about this possibility.

Coming to the limitations, not every type of custom functionality can be packaged into a sandbox solution. From what I’ve seen so far any component that needs files in 14 hive cannot be part of sandbox solution, for e.g.: Visual Web Part. When creating a new visual studio project if you select Visual Web Part template, in the next screen sandbox solution will be grayed out. Next big limitation is you cannot run your code with elevated privileges. If you select “Deploy as sandboxed solution” when creating the project, Visual Studio doesn’t give intellisense for the classes that cannot be used in a sandbox solution. You can still type those classes manually and your project would compile fine but your component won’t work when your sandbox solution is activated. So, keep these two limitations in mind when going for a sandbox solution.

As you saw, you don’t have to involve server team to deploy custom functionality. Anybody with enough permissions can upload whatever customizations they want which is not so good news for farm administrators. To make them happy, Central Administration(CA) gives a way to block the sandbox solutions. In CA under System Settings you can see the “Manage User Solutions” option. Here you can upload the solution you want to block and you can set a custom message to be displayed wherever the components of the blocked solution are used. Below is the screenshot of the web part that is part of a blocked solution.

BlockedSolution2

Hope this of help. This is Sandbox solutions as in the first beta of SharePoint 2010.

]]>
https://blogs.perficient.com/2009/10/18/sharepoint-2010-sandbox-solutions/feed/ 0 223529
Referencing Javascript files in Web Parts https://blogs.perficient.com/2009/03/25/referencing-javascript-files-in-web-parts/ https://blogs.perficient.com/2009/03/25/referencing-javascript-files-in-web-parts/#respond Thu, 26 Mar 2009 03:19:00 +0000 http://blogs.pointbridge.com/Blogs/ayyapusetty_raja/Pages/Post.aspx?_ID=18

To reference Javascript files in web parts, I’ve seen people adding them as embedded resources to the web part assembly. Problem is, simple updates to the Javascript in those files requires redeployment of the DLL and an iisreset.

Another way of referencing JS files is doing the below in CreateChildControls method. This way you can make updates to JS file independent of the web part assembly.

Literal ltlJS = new Literal();
ltlJS.Text = "<script type="text/javascript" src="" + SPContext.Current.Web.Url + "/_layouts/inc/Test.Js"></script>";
this.Page.Header.Controls.Add(ltlJS);

.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode, .ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode pre
{font-size:small;color:black;font-family:consolas, "Courier New", courier, monospace;background-color:#ffffff;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode pre
{margin:0em;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode .rem
{color:#008000;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode .kwrd
{color:#0000ff;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode .str
{color:#006080;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode .op
{color:#0000c0;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode .preproc
{color:#cc6633;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode .asp
{background-color:#ffff00;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode .html
{color:#800000;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode .attr
{color:#ff0000;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode .alt
{background-color:#f4f4f4;width:100%;margin:0em;}
.ExternalClass94D02F4A83B6493D81A1EF4081139C6A .csharpcode .lnum
{color:#606060;}

]]>
https://blogs.perficient.com/2009/03/25/referencing-javascript-files-in-web-parts/feed/ 0 223458
Customizing List Forms https://blogs.perficient.com/2008/05/19/customizing-list-forms/ https://blogs.perficient.com/2008/05/19/customizing-list-forms/#respond Mon, 19 May 2008 20:23:00 +0000 http://blogs.pointbridge.com/Blogs/ayyapusetty_raja/Pages/Post.aspx?_ID=17

MSDN has a very good article to customize list forms in 2003. This post explains how to do the same in 2007. I won’t be going through the steps for creating a custom list definition; there are many good articles for that.

In 2007 SharePoint, List pages for all the lists are rendered using 2 layout pages in 12TemplatePages folder: form.aspx and viewpage.aspx. Similar to how a publishing page is rendered, SharePoint uses the default.master and "form.aspx" to render NewForm/DispForm/EditForm pages while AllItems.aspx page is rendered using "viewPage.aspx" layout. So, any changes to those two layout pages gets reflected in all the lists/document libraries in all SharePoint web applications on that server. When I said ALL lists..I lied :); Picture Library is an exception here, It has its own set of pages.

To have custom list pages for a custom list definition, just like the Picture Library, it needs to have its own set of pages. The only trick here is to make your list definition use those pages. We’ll follow Picture Library’s Schema.xml to associate custom pages to the custom list definition:

  • Copy AllItems.aspx, DispForm.aspx and EditForm.aspx from FeaturesPictureLibraryPicLib folder in to your custom list definition feature folder that contains the list schema.xml. Picture Library has Upload.aspx but no NewForm.aspx.
  • Create NewForm.aspx by making a copy of AllItems.aspx (you can use DispForm or EditForm.aspx also) and rename it to "NewForm.aspx".
  • Make your customizations to these pages. In my case, I created a list definition which had a custom web part in all the pages.
  • Open Schema.xml and update the <Forms> section to delete the "SetupPath" attribute from the Form nodes as shown below.

<Forms>
<Form Type="DisplayForm" Url="DispForm.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditForm.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewForm.aspx" WebPartZoneID="Main" />
</Forms>

  • By deleting the "SetupPath" attribute, we are telling SharePoint to look for ".aspx" pages named after the "Type" attribute in the same folder as Schema.xml.
  • "AllItems.aspx" is associated with the default view of the list. Similar to the above change, delete "SetupPath" attribute from the default view node in the schema.
  • Save your changes and install the feature.

That is all you need to do.

]]>
https://blogs.perficient.com/2008/05/19/customizing-list-forms/feed/ 0 223132
Cross-Web lookup columns https://blogs.perficient.com/2008/03/20/cross-web-lookup-columns/ https://blogs.perficient.com/2008/03/20/cross-web-lookup-columns/#respond Fri, 21 Mar 2008 00:38:00 +0000 http://blogs.pointbridge.com/Blogs/ayyapusetty_raja/Pages/Post.aspx?_ID=16

If you add a lookup column to a list/library from UI, it allows you only to pull information from a list within the same Web. However, if you need a lookup column to pull from a list in any web in the same site collection, you can do so through code. AddFieldAsXml method of SPFieldCollection, as shown below, does the trick for us:

string fieldXML = "<Field DisplayName=’MyLookUpColumn’ Type=’Lookup’ Required=’FALSE’ List=’" + listThatHoldsLookupData.ID + "’ WebId=’" + webThatHoldsLookUpDataList.ID + "’ Name=’MylookUpColumn’ ShowField=’" + Internal Name of data source column + "’ />";
list.Fields.AddFieldAsXml(fieldXML, true, SPAddFieldOptions.AddFieldToDefaultView);

After adding cross-web lookup column as above, you can change the source column from UI but not the source List. Make sure that you are providing the internal name of the data source column for ShowField attribute.

]]>
https://blogs.perficient.com/2008/03/20/cross-web-lookup-columns/feed/ 0 223166
SharePoint People Picker https://blogs.perficient.com/2008/01/14/sharepoint-people-picker/ https://blogs.perficient.com/2008/01/14/sharepoint-people-picker/#respond Mon, 14 Jan 2008 17:40:00 +0000 http://blogs.pointbridge.com/Blogs/ayyapusetty_raja/Pages/Post.aspx?_ID=15

This post is about a recent interesting observation with people picker. After using Windows authentication for a while we switched to forms authentication with custom membership provider. Now when we used people picker, it was displaying the custom membership provider users, which is expected, and also the domain users! This was confusing. After doing little research on the people picker control found that it uses PeopleEditor class and the places it looks for users is driven by the AccountType property. It is an enumeration with possible values of: "DL, SecGroup, SPGroup, User". There is no explanation on MSDN about what each value stands for but there are few guesses in the community content section; listed below:

DL – Distribution List. AD or the custom membership provider

SecGroup – AD Security Group.

SPGroup – SharePoint Group

User – Single User. Here my guess is, single users are all the users that you see under "All People". These are the users who have accessed a Web at least once.

You can set the AccountType property with a comma separated string of above values. My guess is PeopleEditor.AccountType property is set to "DL, SecGroup, SPGroup, User" to search for all possible users. Once I deleted all the domain users from All People I’m getting just the custom membership provider users. This kind of asserts my guess about AccountType.User.

]]>
https://blogs.perficient.com/2008/01/14/sharepoint-people-picker/feed/ 0 223031
Email Document Library item as Attachment https://blogs.perficient.com/2007/11/22/email-document-library-item-as-attachment/ https://blogs.perficient.com/2007/11/22/email-document-library-item-as-attachment/#comments Fri, 23 Nov 2007 05:08:00 +0000 http://blogs.pointbridge.com/Blogs/ayyapusetty_raja/Pages/Post.aspx?_ID=11

I recently worked on a requirement where the client wanted the functionality of sending an item in document library as an attachment. If you look at the OOTB drop down menu of a document library item, it will give you the option to E-mail the link to the document but not to send the document itself as attachment. My client wanted this functionality from the same drop down menu. Like any developer, I started by searching the web hoping that it might be implemented already and save my self from re-inventing the wheel. I came across this great article by Becky Bertram which does exactly the same thing. She used an application page to implement this but unfortunately this is not going to work in my case. I needed a solution where Outlook mail message should open with attachment on click of a link in the drop down menu. This can be achieved using the feature route Becky has explained but we will add javascript to send the attachment instead of the application page.

Let’s look at the steps now. You first need to create a folder for the feature in 12TemplateFeatures. You need to create the feature.xml like this:

<Feature xmlns="http://schemas.microsoft.com/sharepoint/"

Id="f07a7415-abcc-4824-9b94-6b09e17dd7b8"

Title="Email Document as attachment"

Scope="Web" Hidden="false" Version="1.0.0.0"

Description="This feature allows you to E-mail documents from your Document Libraries">

<ElementManifests>

<ElementManifest Location="elements.xml"/>

</ElementManifests>

</Feature>

You might have to change the GUID of the ID. Element manifest file will have the functionality to add the attachment option to the document library item menu and also the javascript to implement it. Create "Elements.xml" in the same folder with the below XML:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<CustomAction

Id="MailDocument.Link"

RegistrationType="List"

RegistrationId="101"

Location="EditControlBlock"

Sequence="350"

Title="E-mail as Attachment"

ImageUrl="~site/_layouts/IMAGES/EML16.GIF"

Description="Allows a user to e-mail a document in a document library to themselves." >

<UrlAction

Url="javascript:function emailDocument(documentUrl)

{

try

{

var protocolsplit = location.href.split(‘//’);

var urlsplit = protocolsplit[1].split(‘/’);

var fileUrl = ‘http://’ + urlsplit[0] + documentUrl;

var outlook = new ActiveXObject(‘Outlook.Application’);

var outlookMessage = outlook.CreateItem(0);

var outlookAttachment = null;

outlookAttachment = outlookMessage.Attachments.Add(fileUrl);

outlookMessage.Display();

outlookAttachment = null;

outlookMessage = null;

outlook = null;

}

catch(e)

{

alert(‘Please check the following: 1. Microsoft Outlook is installed. 2. In IE the SharePoint Site is trusted. 3. In IE the setting for Initialize and Script ActiveX controls not marked as safe is Enabled in the Trusted zone.’);

}

}; emailDocument(currentItemFileUrl);"/>

</CustomAction>

</Elements>

Now you know what to do: install and activate the feature. After activating the feature, your document library menu item should like below:

As you can see in the catch block, you should be ready to lower the IE settings to make it work.

]]>
https://blogs.perficient.com/2007/11/22/email-document-library-item-as-attachment/feed/ 1 223057
The evaluation version of Microsoft Office SharePoint Server 2007 for this server has expired https://blogs.perficient.com/2007/11/22/the-evaluation-version-of-microsoft-office-sharepoint-server-2007-for-this-server-has-expired/ https://blogs.perficient.com/2007/11/22/the-evaluation-version-of-microsoft-office-sharepoint-server-2007-for-this-server-has-expired/#respond Thu, 22 Nov 2007 19:24:00 +0000 http://blogs.pointbridge.com/Blogs/ayyapusetty_raja/Pages/Post.aspx?_ID=10
Definitely not the message you want to see after paying a whole lot of bucks. This happened to a colleague of mine when he tried to setup "My Sites". In fact, same error message was thrown whenever he tried to use any feature of "MOSS Enterprise".
After opening MS ticket and much debugging, here is the solution:
  • Open the associated web.config
  • Make any change and undo it
  • Save the web.config

Believe it or not that is your solution. Hope this helps to somebody.

]]>
https://blogs.perficient.com/2007/11/22/the-evaluation-version-of-microsoft-office-sharepoint-server-2007-for-this-server-has-expired/feed/ 0 223058
Cannot insert the value NULL into column ‘ScopeId’ of Webs table https://blogs.perficient.com/2007/10/01/cannot-insert-the-value-null-into-column-scopeid-of-webs-table/ https://blogs.perficient.com/2007/10/01/cannot-insert-the-value-null-into-column-scopeid-of-webs-table/#respond Tue, 02 Oct 2007 01:18:00 +0000 http://blogs.pointbridge.com/Blogs/ayyapusetty_raja/Pages/Post.aspx?_ID=9

My database attach for WSS migration failed with the message: "Cannot insert the value NULL into column ‘ScopeId’", detailed message at the end. I was able to migrate the same environment two weeks ago successfully but it keeps failing with the new backup. As the message said I tried looking into the Webs table for ScopeId column in the production database. Found that V2 database doesn’t have it but the V3 database does. After much digging, it is found that there is a duplicate entry in my Webs table. I had two entries in Webs table with the same "FullUrl", different Id’s and a NULL "Title" in one of them. After the bad Web was deleted rest of the migration went real smooth. I used the below query to identify the duplicate Web:

SELECT W1.Id As W1Id, W2.Id as W2ID, W1.FullUrl as W1FullUrl, W2.FullUrl as W2FullUrl, W1.Title as W1Title, W2.Title as W2Title

FROM WEBS W1, WEBS W2

WHERE W1.Id < W2.Id and W1.FullUrl = W2.FullUrl

Full migration error:
[SPContentDatabaseSequence] [ERROR] [9/24/2007 8:07:38 PM]: Action 3.0.12.4000 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed.

[SPContentDatabaseSequence] [ERROR] [9/24/2007 8:07:38 PM]: Cannot insert the value NULL into column ‘ScopeId’, table ‘wss_Content.dbo.Webs’; column does not allow nulls. UPDATE fails.

The statement has been terminated.

[SPContentDatabaseSequence] [ERROR] [9/24/2007 8:07:38 PM]: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)

at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)

at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)

at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.ExecuteDataDefinitionMethodCore(SqlSession sqlSession, ISqlSession isqlSession, String sqlscript, SPSqlCommandFactory sqlcmdFactory, String[] strTables, Int32[] nThroughputs, SPLog logGlobal)

at Microsoft.SharePoint.Upgrade.SPDatabaseWssAction.ExecuteDataDefinitionMethod(ISqlSession sqlSession, String sqlscript)

at Microsoft.SharePoint.Upgrade.SecurityUpgrade4.Upgrade()

at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()

[SecurityUpgrade4] [3.0.12.4000] [DEBUG] [9/24/2007 8:07:38 PM]: Begin Rollback()

[SPContentDatabaseSequence] [ERROR] [9/24/2007 8:07:38 PM]: Action 3.0.12.4000 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed to rollback.

[SPContentDatabaseSequence] [ERROR] [9/24/2007 8:07:38 PM]: This SqlTransaction has completed; it is no longer usable.

[SPContentDatabaseSequence] [ERROR] [9/24/2007 8:07:38 PM]: at System.Data.SqlClient.SqlTransaction.ZombieCheck()

at System.Data.SqlClient.SqlTransaction.Rollback(String transactionName)

at Microsoft.SharePoint.Utilities.TransactionalSqlSession.Rollback()

at Microsoft.SharePoint.Upgrade.SPDatabaseAction.Rollback()

at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()

[SecurityUpgrade4] [3.0.12.4000] [DEBUG] [9/24/2007 8:07:38 PM]: Begin Dispose()

[SecurityUpgrade4] [3.0.12.4000] [DEBUG] [9/24/2007 8:07:38 PM]: End Dispose()

[SecurityUpgrade4] [3.0.12.4000] [DEBUG] [9/24/2007 8:07:38 PM]: Elapsed time: 00:01:45.6730040.

[SPManager] [ERROR] [9/24/2007 8:07:38 PM]: Upgrade [SPContentDatabase Name= wss_Content Parent=SPDatabaseServiceInstance] failed.

[SPManager] [ERROR] [9/24/2007 8:07:38 PM]: This SqlTransaction has completed; it is no longer usable.

[SPManager] [ERROR] [9/24/2007 8:07:38 PM]: at System.Data.SqlClient.SqlTransaction.ZombieCheck()

at System.Data.SqlClient.SqlTransaction.Rollback(String transactionName)

at Microsoft.SharePoint.Utilities.TransactionalSqlSession.Rollback()

at Microsoft.SharePoint.Upgrade.SPDatabaseAction.Rollback()

at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()

[SPManager] [ERROR] [9/24/2007 8:07:38 PM]: Action 3.0.12.4000 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed to rollback.

[SPManager] [ERROR] [9/24/2007 8:07:38 PM]: at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()

at Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence.Upgrade()

at Microsoft.SharePoint.Upgrade.SPManager.Upgrade(Object o, Boolean bRecurse)

]]>
https://blogs.perficient.com/2007/10/01/cannot-insert-the-value-null-into-column-scopeid-of-webs-table/feed/ 0 223097
Comments in Upgrade file https://blogs.perficient.com/2007/09/20/comments-in-upgrade-file/ https://blogs.perficient.com/2007/09/20/comments-in-upgrade-file/#respond Thu, 20 Sep 2007 15:16:00 +0000 http://blogs.pointbridge.com/Blogs/ayyapusetty_raja/Pages/Post.aspx?_ID=8

I’m currently migrating a WSS 2.0 environment to MOSS. For my custom site definition I created the upgrade file and placed it in the 12ConfigUpgrade folder. I named the upgrade file as site definition name + "Upgrade" so that the upgrade process will pick it. Being a stickler about having as many comments as possible, I bloated my upgrade file with a lot of comments for all the features.

When I do the upgrade though, for some reason the process was applying the default global template to all the sites that were using the custom site definition. Checked all the related files and all of them looked good. After a careful second look of the Upgrade log I found a message saying that the Site Definition upgrade file is in invalid format. My initial thought was that I might not have closed some tags properly but that wasn’t the case. Just for giggles, I removed the comments and did another migration. What do you know, that worked.

I hope this saves some time to somebody.

]]>
https://blogs.perficient.com/2007/09/20/comments-in-upgrade-file/feed/ 0 223116