How to hide the sidebar and All Updates on 7.12
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Please note that all the workaround stated on this page are beyond Atlassian Support Offerings.
Summary
After upgrading to 7.12, the existing Stylesheet code to hide the sidebar and All Updates do not work.
Environment
Confluence 7.12
Cause
In 7.12, some of the HTML code has been changed by AUI9. The details of the changes are here.
Solution
Add the following code to General Configuration > Custom HTML in the At the end of the HEAD:
<script>
AJS.toInit(function(){
if (AJS.params.remoteUser == ''){
AJS.$('section.aui-sidebar').hide();
AJS.$('main.aui-page-panel-content.content-body').hide();
}
});
</script>