SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 1.01k forks source link

Updating Web Title with member only updates the member's web title #7818

Open kpfeuffer opened 2 years ago

kpfeuffer commented 2 years ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

SharePoint REST API

Developer environment

Windows

What browser(s) / client(s) have you tested

Additional environment details

Describe the bug / error

When updating a webs title with a user with member permissions, this only updates the user's web title and not the web title.

This was tested with the PnP-Framework (version 2.6) using the following code.

I'm using the following code: let myWeb= Web(webUrl); myWeb.update({ Title: title }).then(() => { resolve(true); return; }).catch(() => { resolve(false); return; });

When i execute the code with a user with admin rights (Member of owner group or site collection administrator) the title of the web is updated and all user see the new title. When executing the code with a user with member rights (member of member group) the title is updated for the user, but not for all users. Only the current user see's the new title, all other user see the old title.

Steps to reproduce

  1. Edit the title of the Web as a Member, the Title is only changed for myself
  2. View as another user and it shows up as the previous title
  3. Edit the title as Admin of the Web, updated for all users

Expected behavior

When a member updates the title, either they should get an error regarding permissions, or the update should go through for all users.

ghost commented 2 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

NickSevens commented 2 years ago

Could it be the member user has a different local, compared to the "default" site language? E.g., changing the web title as a Dutch user, does not change the default English title.

In case anyone needs it:

foreach (var lcid in web.SupportedUILanguageIds)
{
    var culture = new CultureInfo(lcid).ToString();
    web.TitleResource.SetValueForUICulture(culture, newTitle);
}