Can I replace “Sorry something went wrong” text with my own custom Text in MySite
-
09-12-2020 - |
Question
I want to change the error text with my custom text. I am using SharePoint 2013 and MySite. In mysite when any user is not found then a error message is displaying.
The message is Sorry something went wrong with large font size and the main error which is User not found is displaying with a link Technical Details in small font size.
I want to replace this text with my own text. Please tell me how can I do this, I've done many research on internet and found nothing.
Please help me with proper solution.
Thanks in advance
Solution
Yes. Basically there are a couple ways how to do that:
Change the default pages. These are application pages stored in /_layouts folder and can be easily modified.
Create a new page and assign it via PowerShell (limited to only a couple of the types of pages you can set the URL for):
$spsite = Get-SPSite "Site URL" $spsite.FileNotFoundUrl = "URL of the Custom Page"
There is an article which describes that in more depth:
How to Change System Application Pages (Like AccessDenied.aspx, Signout.aspx etc)
And a similar (if not the same question) here on SE: Custom "Sorry, something went wrong" message on SharePoint 2013