Master page - Hide Open With Explorer button in Ribbon

%3CLINGO-SUB%20id%3D%22lingo-sub-149758%22%20slang%3D%22en-US%22%3EMaster%20page%20-%20Hide%20Open%20With%20Explorer%20button%20in%20Ribbon%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149758%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20found%20the%20following%20info%20on%20the%20web%3A%20%3CA%20title%3D%22Hide%20the%20Windows%20Explorer%20Button%20in%20SharePoint%20Libraries%22%20href%3D%22http%3A%2F%2Ftechtrainingnotes.blogspot.be%2F2016%2F08%2Fhide-windows-explorer-button-in.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHide%20the%20Windows%20Explorer%20Button%20in%20SharePoint%20Libraries%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EWhen%20I%20add%20the%20piece%20of%20code%20suggested%20on%20the%20web%20site%20to%20my%20Seattle.html%20master%20page%20(tested%20in%20multiple%20site%20collections%20-%20non%20modern%20sites)%20I%20always%20receive%20a%20XML%20error%20(see%20image)%20stating%20that%20my%20file%20isn't%20XML-Compliant.%20IMHO%20the%20reference%2Fsyntax%26nbsp%3Bto%20the%20Ribbon%20object%20is%20not%20correct%26nbsp%3Bin%20the%20master%20page%20context.%20Can%20someone%20confirm%20my%20assumption%26nbsp%3B%26amp%3B%20provide%20the%20correct%20syntax%20for%20referencing%20the%20Ribbon%20from%20a%20Master%20page%20using%20CSS%3F%20Tx.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F27586i4222430A15771CE9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22MasterPage-BlockOWE-Error.png%22%20title%3D%22MasterPage-BlockOWE-Error.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149822%22%20slang%3D%22en-US%22%3ERe%3A%20Master%20page%20-%20Hide%20Open%20With%20Explorer%20button%20in%20Ribbon%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149822%22%20slang%3D%22en-US%22%3EMmmm...might%20I%20ask%20if%20you%20are%20intentionally%20modifying%20a%20SPO%20master%20page%3F%20If%20so%2C%20my%20advise%20is%20not%20to%20do%20it..use%20JavaScript%20injection%20instead%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149804%22%20slang%3D%22en-US%22%3ERe%3A%20Master%20page%20-%20Hide%20Open%20With%20Explorer%20button%20in%20Ribbon%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149804%22%20slang%3D%22en-US%22%3E%3CP%3Egreat%20but%20did%20you%20check%20if%20the%20classes%20that%20are%20used%20are%20still%20the%20same%20as%20the%20blog%20post%20you%20referred%20to%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149781%22%20slang%3D%22en-US%22%3ERe%3A%20Master%20page%20-%20Hide%20Open%20With%20Explorer%20button%20in%20Ribbon%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149781%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%40Deleted%26nbsp%3Btx%20for%20your%20prompt%20reply.%20Your%20suggestion%20of%20location%20made%20me%20thinking%20and%20I%20realized%20that%20I%20pasted%20the%20code%20not%20in%20the%26nbsp%3Bright%20lines%20within%20the%20Master%20page.%20After%20correction%2C%20%26nbsp%3BI%20no%20longer%20obtain%20any%20XML%20warnings.%20Although%20I%20published%20a%20major%20version%20of%20the%20page%20(and%20also%20in%20preview)%20the%20button%20OWE%20is%20still%20visible%20in%20the%20Ribbon.%20Any%20suggestions%3F%20Tx.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149768%22%20slang%3D%22en-US%22%3ERe%3A%20Master%20page%20-%20Hide%20Open%20With%20Explorer%20button%20in%20Ribbon%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149768%22%20slang%3D%22en-US%22%3E%3CP%3EAre%20you%20using%20online%3F%20then%20it%20could%20be%20that%20the%20style%20has%20changed%20did%20you%20look%20it%20up%20with%20the%20developer%20tools%20if%20it%20is%20in%20this%20location%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Contributor

I've found the following info on the web: Hide the Windows Explorer Button in SharePoint Libraries

When I add the piece of code suggested on the web site to my Seattle.html master page (tested in multiple site collections - non modern sites) I always receive a XML error (see image) stating that my file isn't XML-Compliant. IMHO the reference/syntax to the Ribbon object is not correct in the master page context. Can someone confirm my assumption & provide the correct syntax for referencing the Ribbon from a Master page using CSS? Tx.

 

 

MasterPage-BlockOWE-Error.png

4 Replies

Are you using online? then it could be that the style has changed did you look it up with the developer tools if it is in this location?

Hi @Deleted tx for your prompt reply. Your suggestion of location made me thinking and I realized that I pasted the code not in the right lines within the Master page. After correction,  I no longer obtain any XML warnings. Although I published a major version of the page (and also in preview) the button OWE is still visible in the Ribbon. Any suggestions? Tx.

great but did you check if the classes that are used are still the same as the blog post you referred to?

Mmmm...might I ask if you are intentionally modifying a SPO master page? If so, my advise is not to do it..use JavaScript injection instead