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 associated sites are not displayed in the hub News Webpart.
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: The following image shows a Hub site named “hubsite” and 2 associated sites (“hubsitechild1” and hubsitechild2”)
Posting News items from the Hub:
This is what the News Webpart looks like from the root Hub Site:
Now let’s look at a child site:
By default, the News Webpart will only show news from the current site:
Site Admins will need to change this Webpart to view news from the Hub or any associated Hub site. In this example I will choose the “Hubsite”.
With this configuration “Hubsitechild1” will display News posts from the Hub site
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.
How does it work?
- The News Webpart triggers a request to the SP Home Microservice with “DepartmentID”
Example:
Note: The DepartmentID will be the Site ID of the root hub site.
- The SP Home Micrososervice then calls the Search service with “ContentTypeId”, “PromotedState”, “DepartmentId” to retrieve the News items.
Example:
GET: https://tenant.sharepoint.com/search/_api/search/query?querytext='(*)'&QueryTemplate='PromotedState:2 AND ContentTypeId:0x0101009D1CB255DA76424F860D91F20E6C4118* AND (DepartmentId:47060b5d-eb3a-4f7b-a1c0-421fc86cd0f6 OR DepartmentId:{47060b5d-eb3a-4f7b-a1c0-421fc86cd0f6})'&Properties='ClientFunction:HubNewsArticles ,EnableDynamicGroups:True'&ClientType='SPHomePagesWeb'&SelectProperties='DocID,Path,DocID,SiteID,NormSiteId,WebID,NormWebId,GroupID,Title,Description,PictureThumbnailURL,AuthorOWSUSER,SiteTitle,SPSiteUrl,SiteLogo,PromotedState,FirstPublishedDate,UniqueId,ViewCountLifetime,SiteTemplate,IsExternalContent,SPWebUrl,ContentTypeId,Language,Color,ListItemID,DepartmentId'&SourceId='8413cd39-2156-4e00-b54d-11efd9abdb89'&Sortlist='FirstPublishedDate:1'&BypassResultTypes=true&TrimDuplicates=true&EnableQueryRules=false&EnableSorting=true&StartRow=0&RowLimit=13
- The Search results are sent back to the News Webpart and displayed as configured.
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 either manually or by a 3rd party product. In this case the managed property “ AuthorOWSUSER” is used to locate News items. If the value of this property is unexpected or NULL, Hub News items will not be displayed within the Webpart.
Here is the default setting for the “AuthorOWSUSER “managed property.
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.
Resolution
To resolve this issue, simply fix the modified search schema, which can be modified at the tenant level or the site collection level .
The AuthorOWSUSER property exists at both tenant level and site level.
How do we reach tenant level settings?
- Copy this URL and open in the new tab where tenant admin is already signed in https://admin.microsoft.com/sharepoint?page=classicfeatures&modern=true.
- Under Search, select Open.
- Select Manage Search Schema on the search administration page.
How do we reach site level settings?
- On one of your affected hub sites, select Settings, and then select Site Settings. If you don't see Site settings, select Site information, and then select View all site settings.
- Under Site Collection Administration, select Search Schema.
- At this point your URL should look like this https://TENANT-NAME.sharepoint.com/sites/Hub-SITE-NAME/_layouts/15/listmanagedproperties.aspx?level=sitecol
After opening the managed properties list at the tenant/hub site level:
1. Search for “AuthorOWSUSER”
2. You see all matches, including any custom managed properties that set AuthorOWSUSER as an alias.
3. 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”.
4. Make sure AuthorOWSUSER is mapped to “ows_q_USER__AuthorByline” and “ows_q_USER_Author”, if the mapping is incorrect, fix it.
Please Note: 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.
Steps to Re-index the site:
- On the hub site site, select Settings
and then select Site settings. If you don't see Site settings, select Site information, and then select View all site settings.
- Under Search, click Search and offline availability.
- In the Reindex site section, click Reindex site.
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