Problem/Motivation

Navigating away from a node removes the lock but not the locked message.

Steps to reproduce:
1. Start editing a node to create a lock on that node.
2. Navigate away by clicking the "back" button.
3. Click the "leave page" button on the dialog that asks you if you want to leave the node you're editing.
4. Once back to the view of the node, click the browser refresh button
5. The node is locked message is displayed, even though the lock has been deleted.
6. Click refresh again, the message disapears.

Actual results:
After navigating away from a node being edited, the node is locked message is displayed once, even though the lock has been deleted.

Expected results:
You should never see the "Node is locked" message if the lock has already been deleted.

Proposed resolution

Anytime the a lock is deleted, any pending messages in $_SESSION['content_lock'] for that nid should also be deleted.

Remaining tasks

Apply attached patch.

Comments

aasarava’s picture

This happens in 6.x-2.8 as well.

jaydub’s picture

Status: Active » Needs review
matason’s picture

StatusFileSize
new912 bytes

Thanks for the patch, it appears to work but it some circumstances it gives the following notice:

Notice: Undefined index: content_lock in content_lock_release() (line 548 of content_lock.module).

The attached patch against 7.x-1.x should fix this.

ohnobinki’s picture

Status: Needs review » Postponed (maintainer needs more info)

This happens in 6.x-2.8 as well.

I am unable to reproduce this at all in content_lock-6.x-2.8. May you detail how you managed to reproduce it including what browser you were using?

kmonty’s picture

@jared_sprague - I was unable to reproduce this in 7.x-1.4 using your steps. Is this still a bug?

doublejosh’s picture

This patch does fix the problem and is needed. However, it is not language aware and removes the locks for all nodes within the translation set whenever one is saved.

Scenario: open several edit pages for the same node's translations. Save the first translated node. Attempt to save another... lock has been deleted and the save action fails!

doublejosh’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs work
pandaski’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
astonvictor’s picture

Status: Needs work » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks