getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[nextgen-editor] Editor is appearing two times with the same content #201

Closed angusmcb closed 2 years ago

angusmcb commented 2 years ago

Since the last update the editor now appears twice, with the same content.

It doesn't seem to do it for new pages - only existing. I can't work out why that is.

w00fz commented 2 years ago

That is quite bizarre. Is this a custom blueprint? Is it showing double for every page of your site, including default layouts? Have you also tried clearing cache perhaps?

slwa-epowell commented 2 years ago

I am having the same issue! No customisations except to the frontend theme. Every page I tested had this issue. It also took a very long time to load, but this seems to be because vendor.min.js is now 8MB+ (may be unrelated to the next-gen editor update).

I cleared the cache, but unfortunately it didn't help.

w00fz commented 2 years ago

I will take a look

w00fz commented 2 years ago

I'm very confused about this one, I cannot seem to be able to replicate the double editor. Can you add a little bit more context about the setup?

  1. Are you using a custom blueprint or is it a default page?
  2. What theme are you using?
  3. Do you have additional plugins adding fields in your edited Page?

If you can also share a screenshot or anything that can help me reproduce this, that would be greatly appreciated!

w00fz commented 2 years ago

@slwa-epowell I also double checked and the vendor JS file is not 8MB+ but around 1MB. This is the file that loads in your admin. That said, I am noticing I am including the sourcemap file with the package, which is about 5MB and that is definitely superfluous. I will make sure to get rid of that in the next release so you get a much slimmer package, thanks for noticing!

slwa-epowell commented 2 years ago

Thank you for that! And apologies for the confusion, I should have noticed that the 8MB file was actually part of the admin plugin before I mentioned it here.

For my part, here's our setup:

  1. No custom blueprint, it's a default page
  2. Our custom theme is very basic, just a few templates and no additional code in the .php file. I tried switching to Quark and noticed the same issue occurring.
  3. No additional plugins adding fields that I am aware of
  4. Just in case, I will clarify that this is a subfolder installation of Grav.

I did just update Grav and all plugins, then go through and systematically disable plugins and I noticed that shift-refreshing the page sometimes resolves the repeated editor temporarily, and sometimes does not. Similarly, clearing the cache sometimes resolves the repeated editor and sometimes does not. I couldn't find a discernable pattern (perhaps a race condition?). Nothing in the console indicated any errors.

w00fz commented 2 years ago

Hey there,

I wasn't really ever able to reproduce this but I might have identified a couple places where could have caused this potential race-condition issue. I attempted a fix and released it with v1.1.9. It should be available very soon in GPM.

Please let me know if this releases makes the issue go away!

Thanks.

jacobm001 commented 2 years ago

I bought both the typhoon and the nextgen editor plugins today, and I'm experiencing this issue using the default page content. Typhoon is enabled for the frontend, and that appears to be displaying the content correctly.

I am however getting double editors within the admin interface

image

It's definitely producing two instances of the editor

image

w00fz commented 2 years ago

Thanks for reporting this. I really hoped I had fixed this issue. I’m having an incredible hard time reproducing the issue and confused as to why this is happening.

I’ll dig more into this and try to get to the bottom of it. Any additional detail you guys come across that might be helpful for consistently recreating this issue, it would be great.

w00fz commented 2 years ago

Just thought of a question.

When you load the page, do you see double loader spinners and then 2 editors, or do you only see one spinner but then it renders 2 editors?

jacobm001 commented 2 years ago

Good question. It looks like I'm seeing a single entry produced by the template with a single loading animation.

For anyone else trying to replicate this, I had to simulate network throttling via developer tools to make this slow enough to check :)

w00fz commented 2 years ago

And you are able to consistently reload/hard-reload and always get two editors loaded? Or is it a sometimes kind of issue?

jacobm001 commented 2 years ago

It happens every single time and doesn't appear to be page dependent. No amount of cache clearing on either the backend or front end appear to matter at all.

w00fz commented 2 years ago

Thank you.

I can see chrome in your screenshot, are you Mac or Windows?

jacobm001 commented 2 years ago

Neither. I'm running on Ubuntu 20.04 LTS (Desktop) at the moment. I can try to replicate on Windows later if desired.

w00fz commented 2 years ago

That would be great, thank you for the valuable feedback.

angusmcb commented 2 years ago

Hey, sorry for not getting back to this conversation for a while. It's still happening for me too after the patch.

I've found that the problem is not currently happening for me when using Chrome though. It does happen when using firefox.

Other than that it happens both on both windows and linux, and with different php versions.

angusmcb commented 2 years ago

Just to be clear - I can see the bug happening on Firefox on Windows and not Chrome on Windows.

The reference to windows and linux is the server.

jacobm001 commented 2 years ago

I have been able to replicate the issue on a clean grav install on my Ubuntu Desktop. I'm using the built in web server for this environment, and the issue shows up in both Chrome and Firefox for me. Cache still appears to be irrelevant.

w00fz commented 2 years ago

Good news, I was finally able to reproduce consistently via Firefox and was also able to get it resolved.

I will release a new version soon.

Thank you everyone for helping figuring this one out!

w00fz commented 2 years ago

This is now fixed in release v1.1.10.

Cheers!

angusmcb commented 2 years ago

Working great now, thank you!

jacobm001 commented 2 years ago

Wonderful, thanks!

slwa-epowell commented 2 years ago

Can confirm that this is all working properly for me now! Thanks for the hard work on this, the dreaded unreproducible issue.