dsifford / academic-bloggers-toolkit

WordPress plugin providing an all-in-one solution for effective academic blogging.
https://wordpress.org/plugins/academic-bloggers-toolkit/
GNU General Public License v3.0
120 stars 38 forks source link

Edits spontaneously revert while editing a reference #572

Open glorious1 opened 5 years ago

glorious1 commented 5 years ago

ABT Version: 5.1.0

PHP Version: 7.3.6

Theme: GeneratePress

Plugin List: I deactivated all others with Site Health troubleshooting; still happened.

Browser: Firefox 67.0.4, also happens in Safari

Expected behavior: While editing an imported reference in ABT, changes persist.

Actual behavior: Edits revert while I am editing after 10-20 seconds. I don't have to do anything - make a small change, then sit back and wait before saving. When making several edits, I can't finish and save before they start reverting.

Console messages:

// Paste messages here
JQMIGRATE: Migrate is installed, version 1.4.1 load-scripts.php:8:552
onmozfullscreenchange is deprecated. components.min.js:12:80764
onmozfullscreenerror is deprecated. components.min.js:12:80764
dsifford commented 5 years ago

Can you take a screen recording of this?

glorious1 commented 5 years ago

Here is a recording. Here it took about 25 seconds to revert, but I think it varies. If I make several changes over time, they all revert in the same moment.

edit_reversion.mp4.txt

dsifford commented 5 years ago

Ah, so this happens in the edit reference dialog and not in the editor?

glorious1 commented 5 years ago

Right, sorry if that wasn't clear.

adriandomenico commented 4 years ago

Hi, I believe this is caused by the block editor's autosave feature. There are code snippets and plugins to disable it. I use 'EditorsKit' plugin which provides a handy toggle for this purpose.

glorious1 commented 4 years ago

Thanks, that sounds like a reasonable explanation. So switching off autosave with that plugin prevents it from happening?

adriandomenico commented 4 years ago
  1. Correction: Disabling the editor auto-save does not resolve this problem. (Sorry about that) I have used plugins, and code snippets in wp-config.php and functions.php but to no avail. I believe this workaround worked in WP 5.3 but in 5.4 when editing a reference it 'reverts' to the saved version within about 20 seconds.

  2. Cannot change the citation type. Adjusting an entry from Journal Article to Web Page for example and configuring the dialogue before it reverts, does not save the changes. However, changing details within the originally configured citation type does save, if completed before it reverts.

I notice that even when the editor auto-save is disabled, when saving an edit to a reference the editor performs an update which I presume is triggered by the plugin. So perhaps it is something to do with the plugin after all?

If I come up with a fix, I'll let you know.