0

I have a SharePoint site with 3 webpart pages + 1 wiki page ( HOME ) and client asked me to remove "Recycle Bin" and "Page Title" for every page.

I did this by using a script editor web part in each page with the following script:

<style type="text/css">
#sideNavBox a[title="Recycle Bin"]
{
    display:none!important
}
</style>

<script type="text/javascript">
(function(){
      document.querySelector("#pageTitle").style.display = 'none';
})();
</script>

This is working great for me but even after check-out and check-in ( major version every time) all pages other users ( full control and read ) still see recycle bin and page title.

It seems that this is working only for me :/

I am no SharePoint expert, for the most part I don't even know what I am doing.

Please help.

5
  • Did you publish/republish the page after making changes? Did you add the code directly in web part or referencing external JS file on the page? If external file, make sure other users have permissions on this file. Commented Jan 25, 2024 at 15:16
  • Hi ganesh thanks for the comment , i did check out and check in choosing major version ( publish ) every time, i did other changes after this one and those are seen by everyone. I'm not referencing any other file. Users can access regularly to this file they are seiing everything except this change. Users are Full control and read and both can see the file correctly, except the script that it seems is not running for them. Commented Jan 25, 2024 at 15:22
  • Could it be a caching issue? Have a user try a hard refresh of their browser whilst on the site using ctrl + F5. Or it might be minimal download strategy if you have that enabled. Commented Jan 25, 2024 at 15:39
  • Hi Christoffer, i've tried with the client in call on teams to make him ctrl + f5 but it didn't solve the issue. Minimal download strategy ( feature ) is not enabled , you were referring to this one right ? Commented Jan 25, 2024 at 16:02
  • get on a call with one of the affected users and have them debug it with you. Could be the CSS selectors are not valid for them (for whatever reason), could be the iife is not getting triggered, could be the script editor content is not getting loaded. Commented Jan 25, 2024 at 19:21

1 Answer 1

0

I've found the culprit..

Some google chrome installed on clients pc were using italian language and not english language. I really don't know how, but the scripts in italian version were absent, while in english version were ok.

I've also noticed that some IMG links were different between italian and english version of google chrome.

i won't add other comments or what i think about this, because i'm left speechless. Just watch out for your and your clients browser default language.

Bye

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.