• I am having a problem with a client who keeps opening multiple tabs to edit content, then editing one tab, then overwriting it with another tab. This is getting especially rough because the site is multilingual, and translations are getting overwritten.

    I think it’s great that WordPress locks a page when another user is editing it. I would like to extend this to lock a page when that same logged-in user is editing that page somewhere else. I think this would be enough to prevent them from accidentally editing the same page in two different windows. Is it possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • threadi

    (@threadi)

    It is generally not possible to prevent new tabs or windows from opening from within a website.

    Your idea of a “you are already editing this page” notice is quite interesting. I would recommend that you put the idea to the WordPress core developers: https://core.trac.www.ads-software.com/newticket – the sticking point here is that what is developed there only applies to WordPress (e.g. the Classic Editor or the Block Editor), but not to other page builders (such as Elementor or WPBakery). If there were such a possibility, it would not be applicable for every user.

    If you are already using another PageBuilder anyway, I would recommend their support.

    Andrew

    (@andrew1111)

    Another possible tack is the JavaScript Broadcast API. If the user is editing pages from the same domain (origin), in different browser tabs, you could discover this and warn the user. When a tab is opened, a listener could be created that checks the URL for certain criteria (e.g. post=17, action=edit, etc…), and notifies other open tabs. See:

    https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Enforce one instance per page edited (prevent multiple tabs on the same editor)’ is closed to new replies.