Snapey's avatar
Level 122

laracasts frequently throws away replies

If I leave laracasts discussions open on my device and come back later, I can happily browse discussions, change filters etc, no sign that anything is wrong but as soon as I post a reply I get "Page Expired" and my reply is discarded.

This is incredibly frustrating as there is no clue that this is going to happen and that the post is just thrown away

@jeffreyway

0 likes
19 replies
Sinnbeck's avatar

Yeah happens to me as well. Seems Inertia is working with an old csrf token. I try to remember and refresh the page with F5 whenever I come back to page, but I have also lost several posts from this happening.

bugsysha's avatar

@Sinnbeck I guess the last reply should always be saved to localStorage once you click that post button so if you refresh and go back to the topic, you don't have to worry about writing everything again from scratch.

Sinnbeck's avatar

@bugsysha Yeah something like that :) It also sometimes happens when someone removes a post I am replying to. I get a 404 and lose my reply. The person then posts the same post again, and I need to start over :/

bugsysha's avatar

Yeah, very frustrating. Faced that couple of times. Also, I sometimes open a bunch of discussions I plan to reply to, but then I get interrupted and come back to see the issue was resolved or someone has posted exactly the same answer before I did. Some push notifications would be good.

I know this is not the same problem you are describing, but the use flow is the same where I leave something in the background for a while so the user experience might be improved.

webrobert's avatar

Not as severe but same expired page issue for notifications. When trying to clear them, everything else seems to be working but the notifications won't clear. Hard refresh then shows expired page.

Tippin's avatar

@jeffreyway Any chance you may ever consider utilizing websockets? Perhaps a private channel for each user that is always connected for site wide updates, and then a private channel based on each thread, so when you open/load a thread, you join a channel specifically for that thread, and can get new posts to automatically populate the page, that way you will know right away if someone else answered the question while you are writing a response.

Not sure if you accept outside help, but I would totally be up for aiding with this feature as I have used websockets in multiple projects.

1 like
JeffreyWay's avatar

@Tippin Maybe at some point. But it adds a lot of complexity and potential cost.

1 like
JeffreyWay's avatar
Level 59

@snapey Okay, if the page expires (or you accidentally refresh the page), it should now remember your comment when you open the reply modal again.

4 likes
tykus's avatar

@JeffreyWay the only small issue with this implementation is the currentReply in localStorage is not scoped to the current thread. So, if I abandon this reply in this thread (by clicking away rather than Cancel); and I click Reply in another thread; this answer will be pre-populated (and most probably out of context) for the other thread.

Otherwise, it is a great improvement as the expired page issue was more prevalent recently.

3 likes
Snapey's avatar
Level 122

can't wait to try it. Thanks

webrobert's avatar

are replies more buggy now? Trying to edit a reply, nothing happens. spinning wheel. Doesn't work. Refresh etc. Anyone else getting this?

Snapey's avatar
Level 122

@webrobert I just had this @jeffreyway

I was editing a previous reply, but the session had expired. The submit button just greyed and kept spinning.

isimmons's avatar

Just happened to me for the 3rd time in a couple months. I tried to take time to make sure my comment was correct to help others out after I used all latest updates on a older course . When I go to submit, it tells me page has expired. And the comment is lost.

I told myself last time that I would put it in a text file and just copy/paste/submit when I'm sure it is correct. But I forgot.

Funny thing is when I first clicked the reply link, the box opened up with old content from a reply/comment on another course.

Sinnbeck's avatar

@isimmons if you get the error, just hit refresh and click reply again. Your comment will still be there

Please or to participate in this conversation.