CHUVASH.eu

CHunky Universe of Vigourous Astonishing SHarepoint :)

Tag Archives: community

Debugging “What’s happening” in Communities

Recently an issue was reported about count mismatches in SharePoint 2013 Communities. The number of replies in category tiles sometimes is different compared to the community stats in the web part called “What’s happening”. The actual number of replies is 1 in the figure below. The user who has reported has tried to add, update and delete discussions and replies.

 

category-replies-count.png   comm-002

I have invested some time debugging this issue. It would be pity to not share my findings. Well the first thing to do was to determine the type name for the “What’s happening” web part. To do so just edit the  page and export the web part. In the exported .webpart file I saw that the type was Microsoft.SharePoint.Portal.WebControls.DashboardWebPart.

With that knowledge it is time to open ILSpy, an awesome and free(!) assembly browser and decompiler. Load the “Microsoft.SharePoint.Portal” assembly from GAC into ILSpy. Then use F3 to search for DashboardWebPart:

comm-003

The number of replies is retrieved from SPWeb.AllProperties:

comm-004

If the Property Bag does not contain it, it gets the number of replies from the list. The formula is as follows:

list.ItemCount - list.RootFolder.ItemCount

It means that it gets the number of both discussions and replies: ItemCount of Discusssions List. The number of Discussions is determined by the ItemCount in the RootFolder of the Discussions List. Discussions are List Items in the RootFolder (num2 in the figure below). Replies are saved in the subfolders, every discussion gets an own folder. The number of all replies are num3 in the figure below.

comm-005

After checking the web properties I could see that the number of replies there were wrong: 2.

The next step was to determine where and when the Web Properties are updated. The first guess every SharePoint Developer has in such cases is an EventReceiver. Here are all EventReceivers connected to the Discussions List:

$list.EventReceivers | select class, Type, Synchronization | Out-GridView

comm-006

Allright, CommunityEventReceiver then:

comm-007

Found where the actual update happens: CommunityUtils.UpdateWebIndexedPropertyBag

comm-008

The method is used in DiscussionListCommunityEventHandler.HandleEvent

comm-009

There is a flag, flag5 that is used to determine if the Web Properties should be updated:

comm-010

But the flag5 is not true on Delete operations in some code flows:

comm-011

 

That’s it. So deleting a reply will not have any effect on “What’s happening”. But adding a new discussion will also update the stats:

comm-012

To summarize the debug session, there is an issue in the OOB code that misses to update community stats when deleting a discussion or a reply. Adding a new discussion, or a reply will synchronize the stats.

My five takeaways from the SharePoint Conference 2014

spc14

The SharePoint Conference 2014 was an astounding event. Over 10 000 like-minded SharePointers that met, learned a lot and shared new ideas, couldn’t be better. It was also the first time I was to the U.S. and Las Vegas. What a country, what a city! This place must burn people’s lives faster than anywhere else in the world 🙂

I want to share my five takeaways from this conference. I’ll keep it short:

Yammer will be the main social platform. The development of the Newsfeed will be discontinued. I remember the many questions and the ambiguity about what would happen with the newsfeed and Yammer in 2012. Now it has been clear. It will be Yammer and and it will be the cloud.

SharePoint Community is getting really mature. On the conference the the presence of the community was huge. The founders of the SharePoint-Community.net gave an interview on the SharePoint Conference TV (SPCtv). Microsoft introduced new open source projects on codeplex like for example officeams.codeplex.com and on github like for example SharePoint SDK for Android. Many speakers published their demos and the source code on github. All the organizers, speakers and attendees “worked like a network” on the SPC Yammer Network.

SharePoint is here to stay. More and more people work with SharePoint and Office 365. Office 365 is Microsoft’s fastest growing commercial product. The presence of former president Bill Clinton is just another statement that it is a “serious” business.

Apps will evolve and be the main type of solutions. We have not seen the final version of the App Model. There are still many questions and misunderstandings. Although I see a strong will to use solutions using Cloud App Model (CAM) opposed to Full Trust Code (FTC). Pioneers like Vesa “Vesku” Juvonen test the App Model and make the best of it. There are still many shortcomings that force us developers to find workarounds and some hacks. On the other hand, since I talked to the App Model Developers from Microsoft, I feel a sincere will to continuously improve the App Model. Provider-Hosted Apps (mostly written in .NET) will dominate the apps. Applications like the SPHelpDesk will be isolated applications which will be able to run independently from SharePoint and take advantages of the SharePoint environment (like user information and more) when they are opened from a SharePoint site.

SharePoint will go on a diet. We have already seen the divorce of SharePoint from the Workflow Services, from the Office Web Apps, from the App Fabric Cache. It won’t stay there. SharePoint will be redefined as a well-defined part of Office 365. All surrounding products will be separate products.

Вула Чăвашла

VulaCV - Чăвашла вулаттаракан сайт

Discovering SharePoint

And going crazy doing it

Bram de Jager talking Office 365, SharePoint and Azure

My view and thoughts on Productivity and more.

My programming life

and everything in between

SharePoint Development Lab by @avishnyakov

It is a good place to share some SharePoint stories and development practices.

SharePoint Dragons

Nikander & Margriet on SharePoint

RealActivity - Real-time and trustworthy

Blog site of founder, RealActivty - Paul J. Swider

Mai Omar Desouki - Avid SharePointer

Egyptian & Vodafoner - Senior SharePoint Consultant

Cameron Dwyer | Office 365, SharePoint, Outlook, OnePlace Solutions

Office 365, SharePoint, OnePlace Solutions & Life's Other Little Wonders

paul.tavares

Me and My doings!

Share SharePoint Points!!

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

SPJoel

SharePoint for everyone

SharePointRyan

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode, ya mama

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint