After migrating to SharePoint 2010 from MOSS 2007, we faced issues of alerts not being sent. Many users reported the issue and it was an intermittent issue. It was failing for few lists. Even if there are two lists on a site, alerts from one list are working fine, but the other list was failing to send notifications.
I checked the ULS logs and it has entries for COM exception.
Timestamp : 6/22/2013 8:30:01 AM
Continuation : False
Process : OWSTIMER.EXE (0x1D64)
ThreadID : 8464
Area : SharePoint Foundation
Category : Alerts
EventID : c6f5
Level : Verbose
Message : AlertsJob, Filter for Immediate subscription with id {2D5D9F07-D0CE-478F-BFBD-B05AE9C8D337} matched event with Id 11471939
Correlation : aa6f068e-da75-44ff-bcb1-9ef3313dccde
Context : {}
Timestamp : 6/22/2013 8:30:01 AM
Continuation : False
Process : OWSTIMER.EXE (0x1D64)
ThreadID : 8464
Area : SharePoint Foundation
Category : General
EventID : 837l
Level : Exception
Message : An unhandled exception occured. Watson will be invoked.
Correlation : aa6f068e-da75-44ff-bcb1-9ef3313dccde
Exception stack trace:
at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)
at Microsoft.SharePoint.Library.SPRequest.DispatchTimerJob(Int32 lJobType, Guid gVServerId, Int32 lScope, Guid gDatabaseId, String bstrDSNServer, String bstrDSNDatabase, String bstrDSNUser, String bstrDSNPassword)
at Microsoft.SharePoint.Administration.SPNativeDatabaseJobDefinition.Execute(Guid targetInstanceId)
at Microsoft.SharePoint.Administration.SPTimerJobInvokeInternal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService, Int32& result)
The common thing in these errors was "it was throwing exception after applying filter for immediate subscription as highlighted above.
I first located the alert by using PowerShell script given below. I used the script for web application on which the timer job was failing.
$webs=Get-SPWebApplication <webappurl>|Get-SPSite -Limit All| Get-SPWeb -Limit All
$alert=$webs|%{$_.Alerts}|?{$_.Id -eq "<subscriptionid>"}
$alert|Select @{Name="User";Expression={$_.User.LoginName}}, List, @{Name="Url";Expression={$_.List.ParentWeb.Url}}
The script listed the "SharePoint\System" account as user. This was weird and so we verified on the site "is it really a system account subscribing the alerts?". Yes., it was "System Account."
System account cannot subscribe to alerts in SP2010. We were not sure whether it was possible in MOSS 2007. System account do not have Email ID and so we cannot subscribe to alerts using System Account. This was causing the failure of the Immediate Jobs timer job.
The timer job was failing for the lists where system account had subscription and for other lists it was working.
We removed all system account subscription on all sites in the web application and there were no failures any more.
Hope this will help others.
Showing posts with label SP2010. Show all posts
Showing posts with label SP2010. Show all posts
Saturday, June 29, 2013
Monday, March 25, 2013
Lists.asmx: Method not Found
Recently we had an intermittent issues with lists.asmx. It was giving us SoapServerException as below:
Method not found: 'Microsoft.SharePoint.Utilities.SPChunkedStringBuffer Microsoft.SharePoint.SPListItemCollection.GetXmlInternal(Boolean, System.Collections.Hashtable, Boolean, Boolean)'.
The issue was occurring infrequently. We located the issue on two WFE machines.
The exception was saying "Method not found." This is little weird as how OOB dll file miss this method and what is the DLL it is referring to.
I opened the lists.asmx and found that it refers to STSSOAP.DLL.
I searched for the DLL file and we located at two different locations : 1. SharePointRootFolder\ISAPI 2. WebApplicationVirtualDirectory\_app_bin
While browsing through these directories I noted that the DLL files have different "Modified Date". We checked the other WFEs and this difference was not present there. The both files had different versions as "14.0.6024.1000" and "14.0.6122.5000". We recently had server patching and somehow this web application _app_bin folder had the old file and using it.
We replaced the DLL with latest version and the issue is resolved. :)
Labels:
Lists.ASMX,
SharePoint,
Sharepoint 2010,
SP 2010,
SP2010
Thursday, October 4, 2012
Related List /Items View in SharePoint 2010
SharePoint 2010 has an enhancment to show related list views. There is pre-requisite to make it work. You should have lists with relation established using lookup columns.
Let's try it.
1. Create a custom list named "Country". We will use "Title" column. If you want to add any new columns, you can do so.
2. Create one more list named "City". Create the columns as shown below. The "Country" must be a lookup column to "Country" list.
3. Add some city information to the list.
4. Right-click on any city and click "Open in New tab/Window". This way it will launch the display form in browser window. This will make "Site Actions" menu available. The "Site Actions" menu is not available in dialog. Click "Site Actions" -> Edit Page.
Click inside the existing web part zone. The ribbon starts presenting "Page Tools" tab. It has a button "Related List". Click it. It shows the all related list. In our case, it is city.
5. Click on the related List "City". It added a related items view as shown below. It will only show cities for the selected country. i.e. the country for which display form is shown.
6. Do not forget to click "Stop Editing" in the "Page" tab of ribbon. This actually saves the page with changes.
7. User can add items to the related list using related items web part. Click the "Add new item" link and it starts showing add new item form page for the "City" list. You can add item here. If the Country display form (View Properties) is being preseneted for "India", still you can add item for "Japan" from this screen. Be careful.
8. You can change the view of related list items. You can add/ remove column from the view using "Edit the current view" link or selected the appropriate view from the drop-down.
9. Edit the current view, after saving view changes takes back to the display form which will show nothing. So close the browser tab/window and reopen. You can see the changes.
Using SPD 2010:
1. Create a new view "DetailedView" for Country list. The view must be same as All Items view.
2. Check-out the page in SharePoint Designer 2010. To accomplish this, open the list using All Files option in SPD 2010.
3. Right-click the page and click on "Edit in Advanced mode".
4. In "Design" view, click inside the available web part zone. Put the cursor at a location where you want to add the related list items web part.
5. Click "Insert" tab in ribbon and it has a button called "Related Item View". This button presents all related lists as shown below.
6. Click the "City:Country" and it adds the related items view on the page as below. Save the page and check -in
7. The view page on browser refresh starts showing a new column as shown below to select an item and the related items are shown for the selected item. Selected item has dark black arrow icon.
I will suggest to use browser based method as it will avoid the un-ghosting of the page. But if you would like to customize the XSL of related items web part, better to use SharePoint Designer.
Let's try it.
1. Create a custom list named "Country". We will use "Title" column. If you want to add any new columns, you can do so.
2. Create one more list named "City". Create the columns as shown below. The "Country" must be a lookup column to "Country" list.
3. Add some city information to the list.
4. Right-click on any city and click "Open in New tab/Window". This way it will launch the display form in browser window. This will make "Site Actions" menu available. The "Site Actions" menu is not available in dialog. Click "Site Actions" -> Edit Page.
Click inside the existing web part zone. The ribbon starts presenting "Page Tools" tab. It has a button "Related List". Click it. It shows the all related list. In our case, it is city.
5. Click on the related List "City". It added a related items view as shown below. It will only show cities for the selected country. i.e. the country for which display form is shown.
6. Do not forget to click "Stop Editing" in the "Page" tab of ribbon. This actually saves the page with changes.
7. User can add items to the related list using related items web part. Click the "Add new item" link and it starts showing add new item form page for the "City" list. You can add item here. If the Country display form (View Properties) is being preseneted for "India", still you can add item for "Japan" from this screen. Be careful.
8. You can change the view of related list items. You can add/ remove column from the view using "Edit the current view" link or selected the appropriate view from the drop-down.
9. Edit the current view, after saving view changes takes back to the display form which will show nothing. So close the browser tab/window and reopen. You can see the changes.
Using SPD 2010:
1. Create a new view "DetailedView" for Country list. The view must be same as All Items view.
2. Check-out the page in SharePoint Designer 2010. To accomplish this, open the list using All Files option in SPD 2010.
3. Right-click the page and click on "Edit in Advanced mode".
4. In "Design" view, click inside the available web part zone. Put the cursor at a location where you want to add the related list items web part.
5. Click "Insert" tab in ribbon and it has a button called "Related Item View". This button presents all related lists as shown below.
6. Click the "City:Country" and it adds the related items view on the page as below. Save the page and check -in
7. The view page on browser refresh starts showing a new column as shown below to select an item and the related items are shown for the selected item. Selected item has dark black arrow icon.
I will suggest to use browser based method as it will avoid the un-ghosting of the page. But if you would like to customize the XSL of related items web part, better to use SharePoint Designer.
Friday, June 15, 2012
Insert Picture From SharePoint is disabled in CEWP
Recently I came across a scenario in which the user was using content editor web part (CEWP) and using the Rich Text Editor ribbon of SharePoint 2010 to format the content. The user noted that "Insert Picture From SharePoint" option is disabled on a page.
I started investigating and came across MSDN Forum where it is mentioned that activating a publishing feature will resolve the issue. The site must be in publishing context. In our case, the site has the publishing feature activated.
We tried creating various kind of pages (Wiki Page, Web Part Page and Publishing Page). The option was enabled for every kind of page on the same site.
The option was disabled for only one page i.e. default.aspx. The page resides at the site root. I created a web part page in "Site Pages" and verified the option is enabled for the page. I opened the site in SharePoint Designer 2010. I moved the page to the site root. Again, I browsed for the page in edit mode and verified the option, it was disabled.
The page at site root does not belong to any library and has no associated content type for it. The page has few content management features disabled such as "Versioning", "Edit Properties". This is because the page was not child of any library (an orphan page or the parent is site).
Publishing feature has a strong bond with content management features. As the page do not have content management features available, it was not able to take advantage of the publishing context also. That's the reason, it was showing "Insert Picture From SharePoint" in disabled state.
This is not only this option, it also disables capabilities to cut, copy, paste in the Rich Text Editor.
I started investigating and came across MSDN Forum where it is mentioned that activating a publishing feature will resolve the issue. The site must be in publishing context. In our case, the site has the publishing feature activated.
We tried creating various kind of pages (Wiki Page, Web Part Page and Publishing Page). The option was enabled for every kind of page on the same site.
The option was disabled for only one page i.e. default.aspx. The page resides at the site root. I created a web part page in "Site Pages" and verified the option is enabled for the page. I opened the site in SharePoint Designer 2010. I moved the page to the site root. Again, I browsed for the page in edit mode and verified the option, it was disabled.
The page at site root does not belong to any library and has no associated content type for it. The page has few content management features disabled such as "Versioning", "Edit Properties". This is because the page was not child of any library (an orphan page or the parent is site).
Publishing feature has a strong bond with content management features. As the page do not have content management features available, it was not able to take advantage of the publishing context also. That's the reason, it was showing "Insert Picture From SharePoint" in disabled state.
This is not only this option, it also disables capabilities to cut, copy, paste in the Rich Text Editor.
Wednesday, June 13, 2012
Content Editor Web Part duplicating content
Today I received a request mentioning that Content Editor Web Part is duplicating the content. The user was adding clock object prepared in Adobe Flash. This clock was being duplicated whenever the user is editing the web part.
I checked the content editor web part. It has got too many "<embed>" tag. The tags were being duplicated. The clock was being rendered using some JavaScript method. We inspected the method. The method was using "document.write" to add the "<embed>" tag.
Content editor web part renders its HTML/JavaScript content on its canvas. So document.write was adding "<embed>" tag on every "Save" for the web part. So every edit action for the web part was adding "<embed>" tag causing duplicate clocks (content).
We resolved the issue by creating separate content file for Content Editor Web Part. The content file is linked to the Content Editor Web part. As the "document.write" is moved to separate file, for every request the file is read and parsed for render. "document.write" do not append content in the file. So it has no duplication of content.
Always use separate content file whenever we have a content which includes "document.write" in JavaScript.
More Reference(s):
I checked the content editor web part. It has got too many "<embed>" tag. The tags were being duplicated. The clock was being rendered using some JavaScript method. We inspected the method. The method was using "document.write" to add the "<embed>" tag.
Content editor web part renders its HTML/JavaScript content on its canvas. So document.write was adding "<embed>" tag on every "Save" for the web part. So every edit action for the web part was adding "<embed>" tag causing duplicate clocks (content).
We resolved the issue by creating separate content file for Content Editor Web Part. The content file is linked to the Content Editor Web part. As the "document.write" is moved to separate file, for every request the file is read and parsed for render. "document.write" do not append content in the file. So it has no duplication of content.
Always use separate content file whenever we have a content which includes "document.write" in JavaScript.
More Reference(s):
Tuesday, May 8, 2012
Home page of Wiki Page Library / Site
SPFolder class has a "WelcomePage" property. This property is used to set home page for a site / a library or a folder. How to do use it in PowerShell?
1. To set site home page.
$web=Get-SPWeb {webUrl} #remove curly braces
$web.RootFolder.WelcomePage="default.aspx" #change to appropriate value
$web.RootFolder.Update()
2.To set a default page for Wiki Page Library. If clicking on "Wiki Page Libray" in quick launch menu or in all site contents directly opens a page in the library instead of showing the library pages, execute below script. It will start showing all pages.
$web=Get-SPWeb {webUrl} #remove curly braces
$list=$web.Lists[{Wiki Library Name}] #curly braces must be removed.
$list.RootFolder.WelcomePage="Forms/AllPages.aspx"
$list.RootFolder.Update()
1. To set site home page.
$web=Get-SPWeb {webUrl} #remove curly braces
$web.RootFolder.WelcomePage="default.aspx" #change to appropriate value
$web.RootFolder.Update()
2.To set a default page for Wiki Page Library. If clicking on "Wiki Page Libray" in quick launch menu or in all site contents directly opens a page in the library instead of showing the library pages, execute below script. It will start showing all pages.
$web=Get-SPWeb {webUrl} #remove curly braces
$list=$web.Lists[{Wiki Library Name}] #curly braces must be removed.
$list.RootFolder.WelcomePage="Forms/AllPages.aspx"
$list.RootFolder.Update()
Labels:
Home Page,
Sharepoint 2010,
SP2010,
Wiki Library
Sunday, April 8, 2012
Powershell to find site collections with specific feature activated
This is a one liner Powershell to find site collections which have the specific feature activated. See the below example, it display URLs of site collections where "SharePoint Publishing Infrastructure" feature is activated. The "PublishingSite" is the name of publishing infrastructure feature.
So the format is
Note that it will only check for site collection scoped features. The above Powershell can be modified for web scoped features as below.
e.g. To check Publishing feature activation status at web scope, it will look like as below. "PublishingWeb" is a web scoped feature.
This powershell block can be extended for web application/Farm scoped features also.
Get-SPSite -Limit All| Where-Object {(Get-SPFeature "PublishingSite" -ErrorAction SilentlyContinue -Site $_.Url) -ne $null } | Select Url
So the format is
Get-SPSite -Limit All | Where-Object { (Get-SPFeature <Feature Name> -ErrorAction SilentlyContinue -Site $_.Url) -ne $null } | Select Url
Note that it will only check for site collection scoped features. The above Powershell can be modified for web scoped features as below.
Get-SPSite -Limit All| Get-SPWeb -Limit All | Where-Object { (Get-SPFeature <Feature Name> -ErrorAction SilentlyContinue -Web $_.Url) -ne $null } | Select Url
e.g. To check Publishing feature activation status at web scope, it will look like as below. "PublishingWeb" is a web scoped feature.
Get-SPSite -Limit All| Get-SPWeb -Limit All | Where-Object { (Get-SPFeature "PublishingWeb" -ErrorAction SilentlyContinue -Web $_.Url) -ne $null } | Select Url
This powershell block can be extended for web application/Farm scoped features also.
Subscribe to:
Posts (Atom)






