I noticed that there was an issue with the 7.x-1.4 version of this module when a user wants to refresh a page that is through a mandatory redirect through code.

It looks like the onUserExit.js doesn't capture this redirect change and keeps the old nid and ajax_key variables stored in the window.content_lock_onleave function from the first time loading the page. This doesn't play well and causes the old key to be stored the function and the new key isn't captured upon refresh. What I did was move the variables to be set outside of the function, which fixed the issue.

Also I went ahead and cleaned up the spacing on onUserExit.js and content_lock_init.js. I know that the onUserExit.js isn't a created library for this module but something picked up from an outside source, we might need to fork this since the contributor of that library seems to not have a way to update his codebase.

I uploaded a patch, but will need some review to see if this passes any other cases.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marioangulo’s picture

Title: Content Locked After Refresh and Going to New Page » Content Locked After Forced Redirect and Going to New Page
Issue summary: View changes
FileSize
10.37 KB
marioangulo’s picture

Issue summary: View changes
marioangulo’s picture

pandaski’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Status: Needs review » Needs work