Closed (fixed)
Project:
Content locking (anti-concurrent editing)
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Jan 2018 at 14:51 UTC
Updated:
13 Feb 2018 at 13:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kfritscheHere a first patch for this issue.
It does a workaround for detecting how many sessions are open for a single user. I created a issue for Drupal to see if maybe this problem can be solved there (#2937742: Add countSession for a user in SessionManager).
Otherwise this should do the trick.
Comment #4
kfritscheMoved the code from content_lock to content_lock_timeout where it makes more sense.
Also it doesn't break tests there, BUT I created tests for content_lock_timeout. Including old functions there.
On the way needed to fix some stuff, so the patch got quite big. Hope it would be okay to have this all in one issue.
Comment #6
kfritscheDisabled content_lock_timeout for normal tests, as with new logic these are failing. As there are now specific tests for content_lock_timeout this is not a problem.
Also fixing some coding standard issues.
Comment #7
kfritscheComment #8
kfritscheAnd some more coding standard issues.
Comment #9
hchonovWell it looks like we had this error for some time now :).
The second parameter of \Drupal\content_lock\ContentLock\ContentLock::fetchLock() is $langcode :).
I would not say that it "would be a common practice" but just mention that it is possible.
Comment #10
kfritscheBoth comments fixed
Comment #11
hchonovIt looks good to me. Thank you.
Comment #13
chr.fritschLooks pretty solid to me. Thank you