Can't call method "update_lastseen" on an undefined value at /usr/share/koha/C4/Auth.pm line 1322 Please tell me that I am wrong :) Logout in OPAC. Crash Try to login again. Crash
Created attachment 158253 [details] [review] Bug 35231: Resolve crash on unexisting patron in Auth Test plan: Without this patch. Logout from OPAC. Crash. Try to login. Crash. With this patch. Resolved. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No, too simple. Whole feature blocked now :)
Your turn, Martin.
With the patch, my opac is "in maintenance"
(In reply to Caroline Cyr La Rose from comment #4) > With the patch, my opac is "in maintenance" Yes, this patch is not the answer. Will obsolete it. It undoes the whole feature. Did you check if you need to upgrade your version btw?
Before 15504 we had: - return if !$userid || !$activity || !C4::Context->preference('TrackLastPatronActivity'); The unauthorized opac access get stuck here since we dont check empty userid anymore?
Created attachment 158259 [details] [review] Bug 35231: Resolve crash on unexisting patron in Auth Test plan: Enable login in tracking triggers. Check lastseen. (Flush the cache if needed.) Without this patch. Logout from OPAC. Crash. Try to login. Crash. With this patch. Resolved. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 158260 [details] [review] Bug 35231: Resolve crash on unexisting patron in Auth Test plan: Without this patch: Logout from OPAC. Crash. Try to login. Crash. With this patch: Enable login in tracking triggers. Clear lastseen. Flush memcache. Login. Check lastseen. Logout. Login. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Marcel de Rooy from comment #5) > (In reply to Caroline Cyr La Rose from comment #4) > > With the patch, my opac is "in maintenance" > > feature. Did you check if you need to upgrade your version btw? Ah yes, my mistake... I git pulled, but forgot to updatedb... Trying again
Created attachment 158261 [details] [review] Bug 35231: Resolve crash on unexisting patron in Auth Test plan: Without this patch: Logout from OPAC. Crash. Try to login. Crash. With this patch: Enable login in tracking triggers. Clear lastseen. Flush memcache. Login. Check lastseen. Logout. Login. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
It works! I tried with the pref enabled (all activities checked) and disabled (no activities checked)
(In reply to Caroline Cyr La Rose from comment #11) > It works! I tried with the pref enabled (all activities checked) and > disabled (no activities checked) Great!
Created attachment 158272 [details] [review] Bug 35231: Resolve crash on unexisting patron in Auth Test plan: Without this patch: Logout from OPAC. Crash. Try to login. Crash. With this patch: Enable login in tracking triggers. Clear lastseen. Flush memcache. Login. Check lastseen. Logout. Login. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Man, the code in Auth.pm is so complicated. I wondered if $userid may ever be invalid at the point we're using it, but I'm pretty confident it's been validated long prior to this point in the code so we can assume Koha::Patron->find will actually find something. Passing QA
Pushed to master for 23.11. Nice work everyone, thanks!
Depends on Bug 15504 not in 23.05.x