SharePoint 2013 Newsfeed Following Publishing Pages
-
04-10-2020 - |
سؤال
I got a issue with not being able to track changes to a Page on the MySite Newsfeed if im following it.
If I follow a document (.docx
etc) I get notified when the document has been changed. But not for the .aspx
file.
See the below picture:
Here I have followed a .docx
document and I get notified of the changes that Administrator has done. But Administrator has also changed test200.aspx
and no changes are returned on the NewsFeed.
Anyone got a workaround or code piece to solve this puzzle?
المحلول
You have to add the "Content Following Item Updated Event Receiver" event receiver to the pages library.
Farm Solution with Feature and Module:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers ListTemplateId="850">
<Receiver>
<Name>Content Following Item Updated Event Receiver 850</Name>
<Type>ItemUpdated</Type>
<Assembly>Microsoft.Office.Server.UserProfiles, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
<Class>Microsoft.Office.Server.UserProfiles.ContentFollowingItemEventReceiver</Class>
</Receiver>
</Receivers>
</Elements>
Or PowerShell:
Add-PSSnapin Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue
$web = Get-SPWeb -Identity URL
$pagesListId = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPagesListId($web)
$pagesList = $web.Lists[$pagesListId]
$eventReceiver = $pagesList.EventReceivers.Add()
$eventReceiver.Name = "Content Following Item Updated Event Receiver 850"
$eventReceiver.Type = [Microsoft.SharePoint.SPEventReceiverType]::ItemUpdated
$eventReceiver.Assembly = "Microsoft.Office.Server.UserProfiles, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
$eventReceiver.Class = "Microsoft.Office.Server.UserProfiles.ContentFollowingItemEventReceiver"
$eventReceiver.Update()
$web.Dispose()
لا تنتمي إلى sharepoint.stackexchange