This concerns SharePoint online and the News web part.
Edit 2022-03-18: I have talked to Microsoft Support regarding this error below and they have confirmed this to be a bug. They asked me to send in feedback so that people can vote to fix this issue. If you would like to see a solution to this, like I do, then please vote here!
The scenario is the following:
On a hub site there is a news web part that rolls up news from associated sites. The news web part shows images, site title linked to the site where it was created and the news header.
In SharePoint admin center I changed the URL of one of the sites that news was rolled up from. For example: changed the URL from /sites/archive_intra to /sites/archive. That works just as it should and all links pointing to the old URL are redirected, as expected. But then I noticed in the news web part on my hub site, that the news coming from that renamed site was not showing the image and the site title was pointing to the hub site and not the renamed site:
I thought it was the browser cache, so I cleared the cache and pressed Ctrl+F5 a couple of times. That did not help. I checked the same hub site in another browser, so I tried in both Edge and Chrome – still the same. If I clicked on the image or the news article header, then the links worked and it opened the news in the renamed site. Then I noticed that the same problem had occurred on the renamed site – it had a news web part rolling up local news from that Archive site, and it did not show the image either. So it seemed like the problem was with the news web part.
Then I removed the news web part, and added it back again. In the web part properties, I deselected the site and selected it again: No change.
I thought it could be a time delay, like some search index delay or something. But the problem has been there for a week so that is not likely.
You can of course go into the news article, remove the image and add it back again and update the news article – then the news web part will show the image and link. But that is not a solution, that is a workaround if you don’t have too many news articles. But think about if you had hundreds of news…
Since I had a customer reporting this to me, and because I could reproduce the error in my tenant, I raised a support ticket in my tenant to Microsoft Support.
They asked me to do exactly the things I had done before and they were investigating this.
Waiting for a solution…
Microsoft Support sent me the following PowerShell script that could fix the problem. Obviously, I cannot run this on the URL that I have renamed before because that is already done in the admin center, so I had to change the existing URL to a new URL – again. So what they recommend here is to change a site URL with Powershell instead of in the Admin center and see if that had any affect on the news web part. But unfortunately, no – no change with this either. It is doing the exact same thing as when you change the URL in SharePoint admin center. So I am waiting for a solution and will update this post ASAP when I get the solution (hopefully) 🙂
#install and update the SharePoint module
Install-Module -Name SharePointPnPPowerShellOnline
Update-Module -Name Microsoft.Online.SharePoint.PowerShell
#Login to the Admin Center (this is with MFA enabled)
$AdminSiteURL= “https://<your tenant>-admin.sharepoint.com”
Connect-SPOService -Url $AdminSiteURL
Start-SPOSiteRename -Identity $oldurl -NewSiteUrl $newurl -ValidationOnly
Start-SPOSiteRename -Identity $oldurl -NewSiteUrl $newurl