-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is this admin nav repeating vertically? #3087
Comments
I get this too, and I've assumed it's a result of rebuilding the side-nav after a dev crash/restart. |
I think it's when you edit something in an extension and so the code reloads and something isn't clearing its cache properly! |
I also would like to confirm the reported behavior. If I get some free time, I can look into submitting a pull request to fix this. |
I am also seeing this, but it didn't start for me until I activated the |
Any news @michael-misshore ? |
@bricesanchez Unfortunately, I haven't been able to get to this particular issue. The last time I took a look at this, I had a tough time replicating it. Hopefully, I'll be able to take some time to investigate and ultimately get this corrected. |
@bricesanchez I get this all the time. It seems to be associated with restarting the server while continuing to use the same web page. |
I still believe that it's when you change some code in vendor/extensions/ or maybe a decorator and code isn't reloading. |
I almost sure, that the problem is caused by the automatic reloading of changed code mechanism of Rails + this line https://github.com/refinery/refinerycms/blob/master/core/lib/refinery/plugin.rb#L22 |
Do you think that it'd work to modify the line to add a uniq:
|
Something like, but not exactly this way. First, this line is modifying the ::Refinery::Plugins instance variable, while Array |
Ah thanks, of course. So what about: ::Refinery::Plugins.registered.unshift(plugin).uniq!(&:name) irb(main):002:0> foo = [
OpenStruct.new(name: "one"),
OpenStruct.new(name: "two"),
OpenStruct.new(name: "one")
]
=> [#<OpenStruct name="one">, #<OpenStruct name="two">, #<OpenStruct name="one">]
irb(main):004:0> foo.uniq!(&:name)
=> [#<OpenStruct name="one">, #<OpenStruct name="two">] |
Bingo! Now everything looks fine. |
In the following chat on gitter, Brice asked me to create this issue. I don't have any more information.
The text was updated successfully, but these errors were encountered: