Introduced three columns style and page requires a refresh

Moved Technical Support
  • Hi again,

    While working on my new theme I'm seeing something very weird and I'm trying to understand how to fix it. For some reason if I've changed the main layout from one column to three columns, unfortunately, the new div(s) won't show up unless hit the page refresh one more time.

    For example, if I click away to a different page the layout is back to one column but if I refresh the page will display the three columns. If I go back to the home page again is back to one column but if I refresh once more is back to three columns.

    Any reason why all of this is happening?

    Thanks a lot!

  • Screenshots please. If possible share your templates as well

  • @pitaj

    On first page load I get to see it like this
    Screenshot 2021-06-24 at 16.24.51.png

    If I refresh the page I get to see the new layout
    Screenshot 2021-06-24 at 16.24.58.png

    Code changes
    Screenshot 2021-06-24 at 16.24.21.png

    Screenshot 2021-06-24 at 16.24.30.png

    No matter on what page I go I will always have to refresh the page one more time after the first http request. It make me think that some javascript doesn't like me changing the backbone of the theme.

  • This is how the DOM looks like when loads the first time
    Screenshot 2021-06-24 at 16.37.44.png

    This is how the DOM looks like if I refresh the browser page
    Screenshot 2021-06-24 at 16.37.58.png

    Something somewhere it renders the previous layout on initial http request and the new layout on page refresh...

    I'm using QuickStart theme as a start

    I wonder if this is because I'm working in a child theme...

  • The innerHTML of <div id="content"> is replaced entirely with the results of the ajaxify operation, so it's replacing your columns with the new page content.

    You should put your columns outside that element.

  • @pitaj that's it! Oh gosh, I literally couldn't see the connection of that ID. But now it all makes sense.

    Thank you!


Suggested Topics