Comunidades com feeds do Twitter incorporados

Yes, unchecking that setting is not recommended. CSP - content security policy - is on by default for very good reasons. If you need to whitelist some scripts that would normally be flagged by CSP, you can add them to the content_security_policy_script_src setting on your site and they would then work without issue. You can read

if you want to learn more about this.

Doesn’t that setting come unchecked by default?

No, that setting has been on by default for a while now.

Weird, our site didn’t even exist in Jan but our default is not checked

Thanks Joe,
I white listed scripts for twitter time line, It works now with CSP option checked.

Is it possible to change background color of twitter time line to match with the forum background ?

Not easily because it’s in an iFrame so you can’t just add CSS but there are various suggestions on stackexchange, but not sure which work, for example

html - Styling a Twitter feed - CSS won't target .timeline-Tweet-text - Stack Overflow.

Because of lazy loading (sorry if this isn’t the correct term) on discourse, I think any js solution will require

<script type="text/discourse-plugin" version="0.8">
    api.onPageChange(() => {
       Do Stuff Here
    });
</script>

Olá,

Após instalar a barra lateral do Twitter na produção, estamos tendo problemas: o Dashboard não consegue carregar “Inscrições” nem nenhum relatório individual; ele fica carregando indefinidamente. A versão do Discourse é 2.4.1, atualizada recentemente. Quando removo o componente da barra lateral do Twitter, tudo funciona normalmente. Alguma ideia do porquê isso está acontecendo?

Obrigado

Você tem a Política de Segurança de Conteúdo (CSP) ativada? Estou com ela funcionando com estas configurações:

Estou executando a versão 2.5.0.beta2. Não faço ideia do que isso possa ter a ver com relatórios, mas consigo gerar todos os relatórios nos meus sites.

Tenho as mesmas configurações de política de segurança que você. Quando removo a barra lateral do Twitter, os relatórios começam a funcionar, por algum motivo.

Desculpe, realmente não faço ideia de como proceder para solucionar um problema envolvendo um conflito com relatórios do site.

O erro é TypeError: document.getElementById(…) é null

Parece que o div #sidebar não é inserido em todas as páginas?

Isso pode ser corrigido verificando adequadamente se o elemento não é null.

api.onPageChange(() => {
    if (Discourse.User.current() !== null){ 
        var sb = document.getElementById("sidebar")
        if (sb) { 
            sb.style.display = "block"; 
        }
    } 
});
api.onPageChange(() => { 
    var is_iPad = navigator.userAgent.match(/iPad/i) != null;
    if(is_iPad)  {
        var sb = document.getElementById("sidebar")
        if (sb) { 
            sb.style.display = "none"; 
        }
    }
});

Tem alguém que possa me ajudar a incorporar um feed do Twitter, como eles têm na barra lateral?

Apoio totalmente essa ideia. Alguém teve sucesso em eliminar o vício em Twitter da própria comunidade?