Fix SharePoint Online JavaScript Errors When Changing a Site Logo
Question details
The user needs to change a SharePoint Online site logo after encountering JavaScript errors.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- The user selects Getting Started from the gear menu while replacing a site logo.
- Observed behavior
- SharePoint displays JavaScript errors, including “Cannot read property replace of undefined” and “Cannot read property length of undefined.”
Have the replacement logo image ready and make sure you have permission to edit the site settings. Check whether the site uses the classic or modern SharePoint interface.
Reopen SharePoint and change the logo through site settings
Use the appropriate site settings path instead of Getting Started to update the logo.
Close the SharePoint site in your browser, reopen it, and navigate back to the affected site.
For a classic site, select the gear icon > Site settings > Title, description, and logo. For a modern site, select the gear icon > Site information > Change.
Select the new logo image and save your changes using the available confirmation button.

Test the logo change in another browser
Use another browser if the JavaScript error returns after reopening the site.
Work with Office files in WPS Office
WPS Office is a free, lightweight alternative for working with Office files in a familiar interface, making it easier to move everyday document work across applications. It does not fix SharePoint site settings or JavaScript errors.

Frequently Asked Questions
Where can I change the logo on a classic SharePoint site?
Select the gear icon > Site settings > Title, description, and logo, then choose the replacement image and save your changes.
How do I change the logo on a modern SharePoint site?
Select the gear icon > Site information > Change, choose the new logo image, and save your changes.
What should I do if the JavaScript error appears again?
Open the site in another browser and try changing the logo through site settings. If the error persists, capture a screenshot and share it with your SharePoint administrator or support team.
Why can't I access the site logo settings?
Your account may not have permission to edit the site. Ask a site owner or administrator to check your access.




