Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When we login to the site in a state that kicks out another state, we get the notice below. It doesn't seem to cause any issues, but I thought I'd report it.
Notice: Undefined property: stdClass::$id in Drupal\session_limit\Services\SessionLimit->_onSessionCollision__DropOldest() (line 278 of /srv/bindings/ed4c2d1db184474bbda099efbd86aeb3/code/modules/contrib/session_limit/src/Services/SessionLimit.php).
Comment | File | Size | Author |
---|---|---|---|
#2 | session_limit-notice_error-2787013-02.patch | 830 bytes | nicrodgers |
Comments
Comment #2
nicrodgersReplicated and patch attached.
Comment #3
shrop CreditAttribution: shrop at Mediacurrent commentedI think I reproduced this error once, but haven't been able to since. Can you share the settings you are using for Session Limit?
Comment #4
shrop CreditAttribution: shrop at Mediacurrent commentedDescription
I was able to reproduce the issue after all, but needed to apply the patch from issue 2785937 first.
The submitted patch does resolve this issue.
Testing Instructions
Next Steps
Comment #5
shrop CreditAttribution: shrop at Mediacurrent commentedComment #6
nicrodgersthanks Shrop. I hadn't applied the patch you mention, and it was happening every time somebody logged in which trigged a kicking-out of another session - using the default settings.
Comment #7
shrop CreditAttribution: shrop at Mediacurrent commentedGood to know! Well, the patch fixed it for me regardless. Thanks much!
Comment #8
darksnow CreditAttribution: darksnow at Deeson for Deeson commentedThe patch above gets the correct session ID from the session, but a more recent version of this code uses $event->getSessionId() so the patch above is no longer needed.
I'm not seeing this error and the code has changed in the mean time so I'm closing this as out of date unless anyone has any objections.