ExpressionEngine / ExpressionEngine

ExpressionEngine is a flexible, feature-rich, free open-source content management platform that empowers hundreds of thousands of individuals and organizations around the world to easily manage their web site.
https://expressionengine.com
Other
458 stars 125 forks source link

Front End Editing Dock get stuck in edit mode #2769

Open willowlight opened 1 year ago

willowlight commented 1 year ago

Description of the problem

Cannot disable 'edit' mode in Front End Editing Dock. Upon toggling it off, page gets reloaded with the toggle back on.

How To Reproduce

  1. Turn on front end editing
  2. Load side
  3. Try to toggle edit mode off in the dock

Screenshots / Videos / Template Code Video of issue

Environment Details:

Possible Solution None known

willowlight commented 1 year ago

I've narrowed this down to a caching issue. If I'm in development mode and disable caching in the browser, then when the page reloads, it loads the value from exp_frontedit.

intoeetive commented 1 year ago

@willowlight to make sure, you're speaking about browser caching here, correct? Changing any of caching preferences in EE does not have effect here?

If this is correct, what do you do to enable / disable browser caching (and which browser do you use?)

willowlight commented 1 year ago

@intoeetive I open developer tools (both Safari and Chrome), go to the network tab and check "Disable cache". I've noticed that the exp_frontedit cookie has the correct value, but it looks like the dock does not read it always, unless caching is disabled.

intoeetive commented 1 year ago

do you have anything cache-related configured server side? Such as rules configured in .htaccess on nginx files, or all traffic going through caching server etc

willowlight commented 1 year ago

@intoeetive Vanilla .htaccess. I've tried this on several different sites and here's how I replicate it each time:

Load site, edit on the dock is on

  1. Turn off editing, works
  2. Turn on editing, works
  3. Turn off editing, does not work. It's now stuck and only solution is to log out and log back in.
jejuna commented 1 year ago

I'm experiencing this same issue. In Firefox, Chrome AND Edge! The only way I can turn it off is to delete my browser cache. I have tried setting the lifetime settings for exp_frontedit cookie to 0 with no change. (I can't change that back to anything else now,) I have also disabled caching in Caching area of Debugging and Output. No change. It would be nice to be able to set front-end ending on a per-channel basis.

TomJaeger commented 1 year ago

@jejuna What version of EE are you on?

jejuna commented 1 year ago

I'm on EE 7.213, PHP 8.1.9

intoeetive commented 1 year ago

@jejuna does the page reload after you click the toggle to turn front-end editing off (on front-end page)? Do you see any javascript error in browser console? Are you logged in as superadmin?

jejuna commented 1 year ago

@intoeetive Yes, the page does reload. Yes, I'm logged in a superadmin. I see no errors in the console.