Module Position Changes After Exiting Edit Mode

Overview

This article provides information and the resolution to the issue where modules move to a different position after entering and exiting the Edit mode.

 


Root Cause

There is an issue with the Javascript for the Theme Layout, which is expanding the Left Panel as it did not detect the Content on the right panel.

 

dnn.png

 

The Main.ascx on the Cavalier theme had the condition below, which is supposed to expand the left pane if there is no content on the right pane. However, this is not working as intended when a module (besides HTML Pro) is added to the right pane.

 

if ($('.RightPane h6').length == 0 && !$('body').is('.dnnEditState') && $('.RightPane .ModDNNHTMLC').length == 0) {

      $('.LeftPane').addClass("noRightPane");
}

 

2020-03-03_1517.png

 

This issue affects version 9.1.1

   


Resolution

Update the code with the condition to check the entire class instead of just the h6 element:

 

if ($('.RightPane').is(':empty') && !$('body').is('.dnnEditState')) {   
      $('.LeftPane').addClass("noRightPane");
  }


2020-03-03_1531.png

After modifying the code and clearing the cache, the modules will correctly load side by side.

Alternatively, you can upgrade your environment from Evoq 9.1.1 to the latest version. You can download the software packages from the DNN Download site

 

Back to top

Comments

0 comments

Please sign in to leave a comment.