SharePoint Online: News from Hub sites are not displayed in the News Webpart from associated sites

This post has been republished via RSS; it originally appeared at: SharePoint Support Blog articles.

Summary

I recently worked on a case where News from Hub sites are not displayed in the News Webpart from associated sites.

 

1.png

 

This took several months to resolve due to the complexity of hub news webpart and how it integrates with the Search Engine to retrieve and display news from the associated sites.

 

Before getting into the problem, just providing a quick example of the News webpart configuration with a Hub Site.

 

Hub Site Example:

 

2.png

 

 

Posting News items from the Hub:

 

3.png

This is what the News Webpart looks like from the Hub Site:

 

4.png

 

 

 

Now let’s look at a child site:

 

By default, the News Webpart will only show news from the local site:

 

5.png

 

Site Admins will need to change this Webpart to view news from the Hub site or any associated hub site. In this example I will choose the “Hubsite”.

 

6.png

 

 

With this configuration “Hubsitechild1” will should see new posts from the Hub site.

 

7.png

 

 

Note: Since the retrieval of the new posts are based on search, you will not see new posts show up in the news webpart for about 5-15 minutes.

 

Show how does it work?

 

As stated above, it uses search! The News Webpart triggers a filtered search query using 3 main search criteria “ContentTypeId”, “PromotedState” and “DepartmentId”.

 

Now let’s look at the search request that is triggered by the News WebPart on the associated site:

 

GET: https://tenant.sharepoint.com/sites/hubsite/_api/search/query?QueryText=%27*%27&QueryTemplate=%27(%7Bsearchterms%7D)%20ContentTypeId%3A0x0101009D1CB255DA76424F860D91F20E6C4118*%20AND%20PromotedState%3A2%20AND%20(DepartmentId%3A%7B7d9e6536-0078-42d1-935e-131934f4a2dc%7D%20OR%20DepartmentId%3A7d9e6536-0078-42d1-935e-131934f4a2dc)%27&HitHighlightedProperties=%27Title%27&StartRow=0&RowLimit=100&Properties=%27ClientFunction%3ANews%2CEnableMultiGeoSearch%3Atrue%27&sortlist=%27LastModifiedTime%3Adescending%27&SelectProperties=%27ContentClass%2CContentTypeId%2CDefaultEncodingURL%2CDocId%2CEditorOWSUSER%2CFileExtension%2CGeoLocationSource%2CLastModifiedTime%2CModifiedBy%2CPath%2CSPWebUrl%2CSecondaryFileExtension%2CServerRedirectedUrl%2CSiteId%2CTitle%2CUniqueId%2CWebId%27&ClientType=%27HubSiteSearch%27&EnableQueryRules=false&suxrid=ms-oil-datasource-search-news-suggestions

 

Decoded:

 

GET: https://tenant.sharepoint.com/sites/hubsite/_api/search/query?QueryText='*'&QueryTemplate='({searchterms}) ContentTypeId:0x0101009D1CB255DA76424F860D91F20E6C4118* AND PromotedState:2 AND (DepartmentId:{7d9e6536-0078-42d1-935e-131934f4a2dc} OR DepartmentId:7d9e6536-0078-42d1-935e-131934f4a2dc)'&HitHighlightedProperties='Title'&StartRow=0&RowLimit=100&Properties='ClientFunction:News,EnableMultiGeoSearch:true'&sortlist='LastModifiedTime:descending'
&SelectProperties='ContentClass,ContentTypeId,DefaultEncodingURL,DocId,EditorOWSUSER,FileExtension,GeoLocationSource,LastModifiedTime,ModifiedBy,Path,SPWebUrl,SecondaryFileExtension,ServerRedirectedUrl,SiteId,Title,UniqueId,WebId'
&ClientType='HubSiteSearch'&EnableQueryRules=false&suxrid=ms-oil-datasource-search-news-suggestions

 

Behind the scene, this query executes code to pass to the Search service and if all goes well, the Webpart will display News items that are retrieved by the Search service.

 

However, in the case that I was working, the Webpart was not displaying any news, even though the Search request was correct.

Cause

 

We found that the default Search Schema had been modified and the in this case the managed property “AuthorOWSUSER” is used to locate News items. If this is NULL, Hub News items will not be displayed within the Webpart.

 

Here is the default setting for the “AuthorOWSUSER “managed property.

 

8.png

 


As you can see there are 2 crawled properties by default.

 

  • ows_q_USER__AuthorByline
  • ows_q_USER_Author

 

If either one of these crawled properties are missing, Hub News will not be displayed.


Also, we found that in some cases there is a new managed property that uses “AuthorOWSUSER” as an alias.

 

9.png

 

Resolution

 

To resolve this issue, simply fix the modified search schema, which can be modified at the tenant level or the site collection level

 

Tenant level:

https://tenant-admin.sharepoint.com/_layouts/15/searchadmin/ta_listmanagedproperties.aspx?level=tenant


Site Collection level

https://tenant.sharepoint.com/sites/hubsite/_layouts/15/listmanagedproperties.aspx?level=site

 


Search for “AuthorOWSUSER”

 

10.png

 

You see all matches, including any custom managed properties that set AuthorOWSUSER as an alias.

 

 

11.png

 

Locate the problematic Managed property and correct the issue by deleting the property or changing the alias. In this example, I will change the alias of “Thiswillbreaknews”.

 

12.png

 

Since these some of these properties are used in real-time, the problem should be resolved almost immediately.  In a worst-case scenario, you will have to re-index the site, wait for Search to complete (about 15 minutes), then re-create the News Webpart.

 

More Information

 

For additional reading on the topics discussed in this blog see the following articles.

 

What is a SharePoint hub site?

Create a hub site in SharePoint

Use the News web part on a SharePoint page

Manage the search schema in SharePoint Online

Manually request crawling and re-indexing of a site, a library or a list

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.