wagtail / wagtail-live

High speed publishing from messaging apps to a Wagtail live blog. A GSoC 2021 project.
https://wagtail.github.io/wagtail-live/
BSD 3-Clause "New" or "Revised" License
37 stars 6 forks source link

Uncaught SyntaxError in the browser's Console log #129

Closed Vulum closed 3 years ago

Vulum commented 3 years ago

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

Tijani-Dia commented 3 years ago

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 3 years ago

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?

Tijani-Dia commented 3 years ago

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 3 years ago

Hi @Tijani-Dia ,

Thank you for the direction, much appreciated.