Friday, September 27, 2013

How to Correct the Disappearing Navigation Links and Sidebar Error When Using Dynamic View Templates in Blogger

I would visit my own blog from time to time to make sure everything looked alright from the readers perspective. At times, I'd notice that my top navigation bar links would not appear. Additionally, in those same instances, all but the RSS feed button in the sidebar would not display either.



I thought maybe it was a rogue widget, so I tried deleting all but the most basic Google widgets, to no avail. So I tried reinstalling the Dynamic View template altogether, and that seemed to work for a time, but then the problem came back shortly after. Clueless on how to fix it, I started looking into other templates, and eventually to possible other blogging platforms altogether. But I liked my blog, and I really liked Dynamic View other than this one issue. So as a final last ditch effort before switching, I decided to take my search to the Internet - I only wish I had done it sooner!

After a few searches, I discovered a post about it by Southern Speakers, who linked to the actual solution discovered by the writers of Global Nomads. According to Blogger, this is actually a feature, not a bug. It's a little bit of coding that forces a quick post load time on Dynamic Views - even if the rest of the page has not loaded yet!

But the solution is simple and I've posted a step by step list of instructions below - if you'd like to support the original discoverers, you can view the original solution instructions on Global Nomads.

Here's how to fix the disappearing Dynamic View navigation and sidebar error:


  1. Go to your blog dashboard.
  2. In the left navigation bar below the orange "New Post" button, click "Template."
  3. Optional: Click the Backup/Restore button on the top right to download a backup of your template code in case something goes wrong.
  4. After you've made a backup, back on the "Template" page, click the "Edit HTML" button.
  5. Scroll to the bottom of the code and find the "setTimeout" function.
    • setTimeout(function() {
    •        blogger.ui().configure().view();
    •       }, 0);
  6. All you need to change is the 0 to 1000
    • That means that the page will be delayed by a full 1 second, allowing everything to load for most readers before the timeout.
  7. Click the "Save Template" Button and you're done!
Now you can go back and view the page as a reader, notice that everything is now there! If you are still seeing a delay, you can increase the timeout to 1500, but I wouldn't go too much longer than that, because it may scare readers off if they have a slower connection.

I've only noticed the links and sidebar not showing correctly one time since then, and it was probably due to a delay in my Internet connection. I hope that helps!




2 comments:

  1. Hi Justin,

    This seems to be the most popular fix. I've tried it and it just doesn't work. Do you have any advice?

    Thanks

    WM

    ReplyDelete
    Replies
    1. Possibly increase the delay time to 1500ms or even 2000ms . It seems that even, at times, 1000ms isn't long enough. Be careful though, the longer the delay, of course, the longer your potential readers have to wait before you content appears. I think I upped mine eventually to 1500ms, which overcomes the error most of the time.

      Do you have any unique/custom widgets? Sometimes those will cause an error that causes the sidebar not to display.

      Delete