Comment by π» sirwilburthefirst
Re: "[#29] Not sure why, I got index out of bounds on notifications onβ¦"
I ran into this too when clicking a notification link in Lagrange, then click the back button and getting the cached page, then clicking the same link again.
I am guessing that notifications are being deleted from the database once clicked. Maybe serve up a special page in this event?
2023-05-15 Β· 3 years ago
8 Later Comments β
π€ alexlehm [OP] Β· 2023-05-15 at 14:18:
I think the page was current, one notification was from you, the other was from skyjake and that matched what I had in the notification email
π skyjake [mod...] Β· 2023-05-15 at 14:21:
Yeah they are being immediately deleted. I should actually change that so they are simply hidden once clicked and the actual deletion occurs a few days later. That way the links don't immediately break...
Also, I got missing info ("s/None") in a recent notification email, which suggests I forgot to fetch some data from the database after recent changes in the code. Will fix...
π€ alexlehm [OP] Β· 2023-05-15 at 14:23:
ok, i see, that is likely what I did. Maybe it would be better if the notifications stay until they are marked as clear or after an interval
π skyjake [mod...] Β· 2023-05-15 at 14:27:
I'm seeing notification-related exceptions in the server log, so there's definitely something broken there...
π€ alexlehm [OP] Β· 2023-05-15 at 14:34:
i can reproduce that by going back and forth on the dashboard page like @sirwilburthefirst described
π» sirwilburthefirst Β· 2023-05-15 at 14:49:
I think notifications be a one-time thing is a reasonable pattern/expectation. If you don't want to take on the complexity of delayed deletion you could simply have an error page for when a notification can't be found in the database.
π skyjake [mod...] Β· 2023-05-15 at 19:51:
The exception has been fixed in v1.3, but the notifications still always get auto-cleared when opening notification links. I'll consider if it's worth the implementation time to keep them in the database for a while.
π€ alexlehm [OP] Β· 2023-05-15 at 22:19:
after using it a bit further i think the autoclear function is quite ok
Original Post
I had 2 notifications from the email and the first one worked but the 2nd did not and afterwards both did not work