You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#107981 How to stop JCE from refreshing unsaved page?

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Thursday, 10 June 2021 11:23 BST

wgrtjcpr
How can we prevent JCE from clearing unsaved edits?

There seem to be innumerable conditions that cause JCE to reload the page and lose changes not yet saved, while editing the content.

E.g. pressing a wrong control-key sequence,
or dragging the the cursor during a selection outside of the edit pane,
or even just making a selection inside the Code editing pane.

Today I lost the same changes three times in a row when I tried to remove opening and closing double-quotes from a string using the Code mode.
No problem deleting the opening quote, but as soon as I tried to highlight or delete the closing quote, JCE would REVERT the entire page instead!!!
I finally got it done by deleting the ending quote before the opening one.

This nasty behavior is particularly aggravating when one is in a hurry to get something published and does not want to waste the time to save every minute.

Ryan
E.g. pressing a wrong control-key sequence,
or dragging the the cursor during a selection outside of the edit pane,
or even just making a selection inside the Code editing pane.

Today I lost the same changes three times in a row when I tried to remove opening and closing double-quotes from a string using the Code mode.
No problem deleting the opening quote, but as soon as I tried to highlight or delete the closing quote, JCE would REVERT the entire page instead!!!
I finally got it done by deleting the ending quote before the opening one.


Does this only happen in the Code tab, or have you experienced this in the Editor tab too?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

wgrtjcpr
I have watched more carefully for the conditions now.
And I can confirm that it happens under BOTH tabs.

Sometimes it may be caused by a session timeout. E.g. after having answered a phone call, when one comes back to the page that still looks the same -- but as soon as one clicks anywhere, one gets prompted for a new login. After that the work has vanished.

Other times, just minutes after a login, as little as dragging over a passage to highlight it for overwriting can cause a reload. Usually that goes along with a message that the page was reloaded "because an error occurred," but without any indication of what kind of error that might have been!

Also, this happens on a 2018 MacBook Pro under BigSur 11.4 using Safari as well as on an M1 PowerBook Pro using Chrome.

Incidentally in several other window tabs that may include forms with non-JCE edit fields, when we accidentally hit something that loads another page, we can typically just click the browser's "show previous page" button -- without unsaved changes having disappeared there.

Ryan
Sometimes it may be caused by a session timeout. E.g. after having answered a phone call, when one comes back to the page that still looks the same -- but as soon as one clicks anywhere, one gets prompted for a new login. After that the work has vanished.


This is Joomla session management at work. Although Joomla does try to keep the session open when editing using a backend process, this will still eventually time out, and log you out.

Other times, just minutes after a login, as little as dragging over a passage to highlight it for overwriting can cause a reload. Usually that goes along with a message that the page was reloaded "because an error occurred," but without any indication of what kind of error that might have been!


I've not been able to reproduce this, but it sounds like the result of a javascript error of some sort. Does this happen in the front-end or admin?

Yoou could try using the AutoBackup plugin (you will need to add this to the editor toolbar in Editor Profiles -> Features & Layout), which will store a copy of the editor contents every 20 seconds, which you can recall at any time by clicking the AutoBackup button (this only works in the Editor tab though).

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.