[021] Real time threads [Deleted]

021

Well-known member
021 submitted a new resource:

[021] Real time threads - Provides processing of all actions in threads in real time.

Overview​

  • Provides real-time messaging in threads.
  • Provides real-time display of reactions.
  • Provides real-time content updates when editing a post.
  • Provides deletion of posts / update of their content when their status changes in real time.
  • Adds an "Activity" block to the bottom of the post list that displays users who are typing a message in a thread.
View demo...

Read more about this resource...
 
i am logged in as test user on tablet and admin on laptop. Activity center doesnt show anything on either device. When I post, it never "refreshes" the page.
 
seeing this in the browser console:


jquery-3.5.1.min.js?_v=e0c1e429:2 jQuery.Deferred exception: Cannot read properties of null (reading 'events') TypeError: Cannot read properties of null (reading 'events')
at Object.bindEditorTypingTriggers (https://thumped.com/bbs/js/bs/real_time_threads/thread.min.js?_v=e0c1e429:6:212)
at Object.init (https://thumped.com/bbs/js/bs/real_time_threads/thread.min.js?_v=e0c1e429:3:501)
at HTMLDocument.<anonymous> (https://thumped.com/bbs/js/bs/real_time_threads/thread.min.js?_v=e0c1e429:10:220)
at e (https://thumped.com/bbs/js/vendor/jquery/jquery-3.5.1.min.js?_v=e0c1e429:2:30005)
at t (https://thumped.com/bbs/js/vendor/jquery/jquery-3.5.1.min.js?_v=e0c1e429:2:30307) undefined
S
 
also this doesn't seem like the optimal place for a reply to appear :LOL:


1683156212136.webp



(pixelexit flatawesome theme)
 
Just FYI if someone wanted to make it work with guest page caching, there's a note on the page where you enable guest page caching:

1683214917322.png

Specifically this part:
If you have custom functionality that triggers something for guests that requires a CSRF token (normally a POST or AJAX request) and it is triggered immediately on page load, there may not be enough time to fetch the required CSRF token first. You can work around that limitation by first checking if the JavaScript object XF.config.csrf exists before sending your request.

A cached page doesn't have a CSRF token, so when a user is presented with a cached page, the the first thing it does is fetch a valid CSRF token for the user so they can make POST/AJAX requests. But if something else fires a request that requires a CSRF token before the CSRF token can be retrieved, you would end up with the security error. It's not hard to make sure you have a CSRF token before making the request, but it would need to be logic added to whatever is making the request. If you want it to work with guest page caching anyway...
 
Just for the record - That security alert was definitely being triggered by a different add on than Real Time Threads. At some point I’ll have time to figure out which one doesn’t play nice with Cloudflare caching, but as pointed out already I have… let’s say several add ons installed. I really like that functionality though and disabling it doesn’t really count as “a fix”.

And to get back on topic, I’ll also try to identify whatever add on is conflicting with this one for me. Real Time Alerts is working great too.
 
And to get back on topic, I’ll also try to identify whatever add on is conflicting with this one for me. Real Time Alerts is working great too.

looks like it's not compatible with @Ozzy47's [OzzModz] Quick Reply Sticky addon - disabling that makes the console error go away.

now to figure out why replies are appearing below the sidebar
 
also this doesn't seem like the optimal place for a reply to appear :LOL:


View attachment 285540



(pixelexit flatawesome theme)
Strangely, this is being caused by the Latest Profile Posts widget. Tried moving the widget to a different position and the new replies still appeared below it. Disabled it entirely on threadview and the problem stopped.
 
  • Like
Reactions: 021
Can we have an option to disable this for guests? Please.
It's conflicting with guest full-page caching.

I do have full-page caching on the server side and also via Cloudflare.
Thanks!
 
Back
Top Bottom