wikitribune / fabrica-collaborative-editing

Plugin to make WordPress more Wiki-like by allowing more than one person to edit the same Post, Page, or Custom Post Type at the same time. When there are conflicting edits, it helps users to view, compare, and merge changes before saving.
MIT License
20 stars 4 forks source link

after refresh #2

Open Surgeonito opened 6 years ago

Surgeonito commented 6 years ago

There is a case when the plugin is not working properly.

When user A saves and after his admin edit panel is fully refreshed and THEN user B updates - all is ok.

But when two users are editing the post and both of them will press 'Update' at the same time - one of them will get this : edit post multisite wordpress

user B has taken over and is currently editing. Your latest changes were saved as a revision.

Surgeonito commented 6 years ago

I checked the parameters' set send with this heartbeat request and there was no 'fce' field, so the \Fabrica\CollaborativeEditing\Base::filterHeartbeatResponse method is not doing what it is supposed to do.

Somehow the code wp.heartbeat.enqueue('fce', { 'post_id' : jQuery('#post_ID').val() }, true); in \wp-content\plugins\fabrica-collaborative-editing\js\post.js takes no effect.