Forum Discussion
KCLTW
Feb 16, 2024Copper Contributor
News post got stuck in hub site’s news web part even after removing the site from the hub
Hi all! I had posted some news on my SP site and then associated the SP site with a hub. After adding a news web part to the hub, the news from the associated site correctly rolled up. However, after...
KCLTW
Feb 21, 2024Copper Contributor
I waited for a day after reindex'ing the library but the news from the removed site still show on the hub. I tried to unpublished the news on the removed site and republished the news. The news disappeared from the hub but still showed up after republishing. Is there something else that can possibly cause this issue? Thanks!
- SteveKnutsonFeb 21, 2024MVPThis might help
https://sympmarc.com/2022/03/22/news-post-stuck-in-hub-sites-news-web-part-even-after-deletion/?utm_sq=h0rmeglclv- KCLTWFeb 22, 2024Copper ContributorThanks! I don't have the SP admin role though so it does not seem like I can use PowerShell to change the PromotedState.
- Rob_ElliottFeb 22, 2024Silver Contributor
KCLTW you can change the Promoteds State with JSON. Demoting a news article on the associated site should also remove it from the hub site. The JSON for demoting a news page is:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style": { "flex-wrap": "wrap", "display": "flex", "flex-direction": "row" }, "children": [ { "elmType": "div", "txtContent": "=if(@currentField == 0 ,'0 : Page' , if(@currentField == 1, '1 : Draft News' , if(@currentField == 2 , '2 : Published News','') ) )", "style": { "box-sizing": "border-box", "padding": "4px 8px 5px 8px", "display": "flex", "border-radius": "16px", "height": "27px", "align-items": "center", "white-space": "nowrap", "overflow": "hidden", "margin": "4px 4px 4px 4px", "border": "1px solid", "background-color": "=if(@currentField == 0 ,'#ffffff' , if(@currentField == 1, '#fffcec' , if(@currentField == 2 , '#dafffe','') ) )" } }, { "elmType": "div", "style": { "font-size": "18px", "cursor": "pointer", "padding": "10px", "border-radius": "50%", "display": "=if(@currentField == 0 , 'none' ,'')" }, "attributes": { "iconName": "MoreVertical", "class": "ms-fontColor-themePrimary ms-bgColor-themeLighter--hover" }, "customCardProps": { "openOnEvent": "click", "directionalHint": "rightCenter", "isBeakVisible": true, "formatter": { "elmType": "div", "txtContent": "Demote (Change to 1: Draft News)", "style": { "padding": "10px 20px 10px 20px", "cursor": "pointer" }, "attributes": { "class": "ms-bgColor-themeLighter--hover" }, "customRowAction": { "action": "setValue", "actionInput": { "PromotedState": "1" } } } } } ] }Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)