Keystone-classic: Sub Menu randomly goes missing?

Created on 18 May 2016  路  19Comments  路  Source: keystonejs/keystone-classic

In Keystone 0.4, the sub menu sometimes goes missing? This is intermittent but does happen quite often.

Expected behavior

screen shot 2016-05-18 at 10 13 29 am

Actual behavior

screen shot 2016-05-18 at 10 12 57 am

Fix

A quick refresh on the page will fix the issue and the menu reappears

bug

Most helpful comment

Hey guys, sorry been busy. It certainly fixed it on mine and Vincent's case. Odd. I will make a PR for the change over the weekend!

All 19 comments

@webteckie I think you were saying you experienced this too? Did you ever manage to pin down a way to reproduce this? I've still been unable to make it happen.

Same, that's really weird! @Vincent-Loi do you have reproducible steps to make it happen reliably?

@jstockwin @mxstbr Hm not straightforward but I found that restarting the server/keystone and then quickly clicking through the parent tabs might do it

@Vincent-Loi Still can't reproduce, not for lack of trying.
When it happens, are there any errors in the keystone console, or the browser console?
If you inspect element in your browser and have a look for the <nav class="secondary-navbar"> element, what do you see? Is it there? If so, why can't you see it?

@jstockwin @mxstbr you will really need to try harder on this one:=) You may need to click around and about a few times. @Vincent-Loi thanks for creating the issue as I forgot to when I first saw this...of course, at that moment I was the only one that could see it and @mxstbr thought I was crazy :=) Glad someone else has been able to see this :=)

I clicked around for a good 5 minutes and it never disappeared. Do you mean click around the sub-menu itself? Or back and forth from the item screen? I assume you did it on the test server?

Focus on one submenu. Click it, click one of its items. Click the submenu again. Click menu. Repeat N times:=)

@webteckie Glad I'm not the not only experiencing this either, even though it's not happening to others haha.

@jstockwin Well for me, clicking around the primary menu or just one and refreshing a few times also helps reproduce it too, I just did it to get the screenshots. Yes, this issue exists locally and on server.

<nav class="secondary-navbar"> isn't there when the menu goes missing..

Working

screen shot 2016-05-18 at 12 13 03 pm

Missing

screen shot 2016-05-18 at 12 12 38 pm

@Vincent-Loi thanks. What are those 64 warnings in your console?

@jstockwin Good spot haha. It's just a large bunch of these though.. assuming its defaultColumns I specified but removed from my model?

List.js:153 Invalid Column specified: name
List.js:153 Invalid Column specified: createAt
List.js:153 Invalid Column specified: author

The search for intelligent life continues.

So, to reproduce this:

  1. Go to a section that has only One secondary nav item.
  2. Resize your browser's width or height. Boom, gone.
  3. To get it back, go to another section that has more than one secondary nav item...refresh the page.

Changing this line from length > 1 to length > 0 seems to fix it for us. :)
/admin/client/App/components/Navigation/Secondary/index.js

Works responsively too.

screen shot 2016-05-21 at 00 04 06

:+1: PR?

@Vincent-Loi / @webteckie since I never managed to reproduce this, could one of you check that @terenzeyuen's solution solves the problem for you?

@teaualune - a Pull Request with that change would be great if you don't mind! Thanks

I made that suggested change and couldn't duplicate the issue. Not sure the change really addresses the issue but it doesn't seem to cause any other issues either. And if it actually fixed something for @terenzeyuen then I say feel free to PR the change! Eventually I ran into issues mentioned in #2888 which render the nav bar unusable, anyways :-)

Hey guys, sorry been busy. It certainly fixed it on mine and Vincent's case. Odd. I will make a PR for the change over the weekend!

This issue should be closed as it has been fixed.

馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ttsirkia picture ttsirkia  路  4Comments

josephg picture josephg  路  4Comments

jacqueslareau picture jacqueslareau  路  5Comments

sarmadsangi picture sarmadsangi  路  5Comments

kamontat picture kamontat  路  5Comments