wagtail/wagtail-live

Uncaught SyntaxError in the browser's Console log

Vulum opened this issue · 4 comments

Vulum commented

Hi

I set my Wagtail live app successfully with Long Polling: Set up long polling publisher as my publisher.
I am able to post from slack to my liveblog app. However, I am getting the following errors in my browsers console log:

Uncaught SyntaxError: Identifier 'csrftoken' has already been declared
Uncaught SyntaxError: Identifier 'LivePostsTracker' has already been declared
Uncaught SyntaxError: Identifier 'basePollingURL' has already been declared

What have I done wrong?

Advance appreciation for your help

Hi @Vulum,

I'm not sure of what's happening... Can you verify that you are not including the polling templates more than once?

Vulum commented

Hi @Tijani-Dia,

You are right I repeated {% include "wagtail_live/live_posts.html" %} and {% include "wagtail_live/polling/long_polling.html" %}
twice respectively. I guess an oversight issue. thank for pointing it out.
By the way, is there any ways I can properly style the template?

Hi @Vulum, you can find here the template used for live posts. You can target the elements and style them like you want. You can also override this template to use your own one.

Vulum commented

Hi @Tijani-Dia ,

Thank you for the direction, much appreciated.