support-chat
This is the support-chat chat channel, created by KajMagnus (KajMagnus), 2016-10-01 08:47:17.784Z
Chat about Talkyard and related things. E.g. ask quick questions.
Hi @BSitzer oh sorry I'm doing that manually currently (running Certbot to generate a HTTPS cert). Send me an email, or a message here, once the CNAME is back? Sorry for the trouble.
All good thanks @KajMagnus.
I readded the CNAME again yesterday.
Hey there! I'm currently exploring Talkyard (and it's looking promising), but I'm curious if there's a straightforward method for creating posts through an API call (using curl). I've checked out the documentation but haven't stumbled upon a solution for this. Thanks a bunch in advance!
@gbenguze Yes there's an API for creating posts, check out this end-to-end test:
https://github.com/debiki/talkyard/blob/main/tests/e2e-wdio7/specs/do-api-create-pages-comts-check-webhooks-search.2br.e2e.ts
and search for "makeCreatePageAction" (in that file).
Here's more nice-to-read docs: How to Like and Subscribe to Pages via the API ... it's almost what you want, but about Liking and subscribing to pages. I can try to create a similar API docs page about posting posts, and send you a message.
With creating posts, you mean creating new pages? (Rather than comments?)
@KajMagnus Thanks a lot for getting back to me promptly. I'll take a look at the links you provided. Just to clarify, when I mentioned creating a post, I was referring to creating a new topic. Or is it more aligned with creating a comment?
@gbenguze It's for both creating topics and comments. I'll write some docs tomorrow, starting with how to create topics :- )
@KajMagnus That will be great. Looking forward to the docs
@gbenguze Here's the new docs: How to create Pages and Comments via the API. I'm going to proofread the docs tomorrow / later today (but maybe I might as well message you now).
Hi, I'm generally new to making websites etc. I made one with Hugo using Hinode template, depolyed on cloudflare. I'm trying to add talkyard commenting, but the iframe is blocked with csp. I get error
Refused to frame 'https://my-site.talkyard.net/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://usablewatts.com".
I think I tried to do everything to change the frame-ancestors policy, but no effect. I added _headers with various csp values and cloudflare can read them (ex. when I changes some for scripts-src the website breaks due to some inline scripts/styling - including scripts for talkyard). But the frame-ancestors never changes and I always get the same error. I also tried to add header via Transform Rules, but the same effect.
example _headers file:
/*
Content-Security-Policy: frame-ancestors 'self' https://*.talkyard.net;
any ideas?
Hi Marcin @sirlod, is there currently a page over at your blog that tries to load the comments? Then I could go there and have a look.
Hmm this looks odd: Refused to frame 'https://my-site.talkyard.net/'
— is the real text "my-site
" literally, or you've edited it and inserted "my-site
" as sample text?
I think I tried to do everything to change the frame-ancestors policy, but no effect. I added _headers with various csp values and cloudflare can read them
Hmm, you mean you did that for the Hugo blog? That wouldn't affect the blog comments though — they're served by a different server (the talkyard.net
server), which won't know about changes made to the Cloudflare settings.
the frame-ancestors never changes
Talkyard's Frame-Ancestor security policy wouldn't change if you edit the Hugo settings. Instead, you'd go to:
https://comments-for ... talkyard.net/-/admin/settings/embedded-comments
to change it. It's the Allow embedding from field — but it looks correct, I just had a look.
ok, I get it now. I was testing it on a dev page which has different url. I thought it was a csp problem on the hugo/cloudfare side. It is working now, thanks! now have to figure out how to make it dark/light mode themes and make them follow the theme of blog.. ;)
@sirlod Ok :- ) Dark/light modes — currently that's by editing CSS. (How familiar are you with CSS?) I see there's a theme switcher over at your blog. Then, check out this: Changing the colors #post-9 — it's about how to activate different CSS in the blog comments iframe, depending on what theme (light / dark) is active at the blog (embedding website).
ok, managed to make the theme of comments follow the theme of blog (dark/light/auto). It doesn't work for the writing comment windows, as it is another iframe. But it is ok for me for now. if anyone needs it for future, here is my js code on talkyard:
window.addEventListener('message', event => {
if (event.origin === 'https://your-domain.com') {
const data = event.data;
console.log('msg-in:', data.theme);
if (data.theme !== undefined) {
// Apply dark/light mode styles based on received theme
document.documentElement.classList.remove('light-mode', 'dark-mode');
if (data.theme === 'dark') {
document.documentElement.classList.add('dark-mode');
} else if (data.theme === 'light') {
document.documentElement.classList.add('light-mode');
} else if (data.theme === 'auto') {
// Use matchMedia to listen for changes in the color scheme preference
const matchMedia = window.matchMedia('(prefers-color-scheme: dark)');
if (matchMedia.matches) {
document.documentElement.classList.add('dark-mode');
} else {
document.documentElement.classList.add('light-mode');
}
}
}
}
});
window.parent.postMessage({ pageLoaded: true }, '*');
and on the blog side:
const postThemeToIframes = (theme) => {
// Send a message to all iframes
Array.from(document.querySelectorAll('iframe')).forEach(iframe => {
if (iframe.contentWindow) {
iframe.contentWindow.postMessage({ theme }, '*');
console.log('msg-out:', { theme });
}
});
}
window.addEventListener('DOMContentLoaded', () => {
window.addEventListener('message', (event) => {
if (event.data.pageLoaded) {
postThemeToIframes(theme); // Post the theme when iframe ready
}
});
document.querySelectorAll('[data-bs-theme-value]')
.forEach(toggle => {
toggle.addEventListener('click', () => {
const theme = toggle.getAttribute('data-bs-theme-value')
postThemeToIframes(theme); // Post the theme when it's changed
})
})
})
Hello! I'm a new user and I have managed to self-host Talkyard on a VPS. Just wanted to pop by and say that the installation process was really simple and the instructions were well written.
Thank you for working on this project!
Hi @hungrybluedev Ok :- ) Sorry for the late reply, I was distracted by the summer here
@sirlod Thanks for posting the dark/light/auto solution :- ) Sorry for the slow reply. Looks as something good to include in the documentation section, I'll move or copy it to there (if ok with you?)
Hey folks! Just started using talkyard and first impression is great. I have an issue embedding comment sections on my blog though.
I followed the instructions to add the comments to "Something Else" which meant adding the JS snippet to the blog post template.
I'm using AstroJS as a static website generator. What happens is that the script itself loads, but then there's a 404 trying to load additional stuff. That's the URL that gets requested: https://c1.ty-cdn.net/-/embedded-editor?embeddingUrl=https://walterra.dev&embeddingScriptV=2
And that's the response:
404 Not Found
There is no site with hostname 'c1.ty-cdn.net' [TyE404HOSTNAME]
Any thoughts on what I might be doing wrong? Let me know if you need more details.
From what I see so far I think there's some post-processing going on with Astro that strips the talkyardServerUrl = "..."
part, will investigate and report back!
Was able to fix it! The trick was to adapt the snippet and use <script is:inline>...</script>
with AstroJS.
@walterra Hmm this (from your first comment above) didn't look right: https://c1.ty-cdn.net/-/embedded-editor?...
— that ought to be https://site-12345abcde.talkyard.net/-/embedded-editor?...
. I had a look at your blog, and now it does show the latter, so, seems fine now.
I haven't used AstroJS, why does one need is:inline
? Aha, "To prevent Astro from processing a script, add the is:inline directive." https://docs.astro.build/en/guides/client-side-scripts/. Interesting with AstroJS, hadn't heard about :- )
Hello. I just joined Tlakyar and set up my initial account. Something went wrong, I guess, since I'm not receiving the email confirmation link. And now I can't access the community I just created. The error message is the following: : Error 403
You have not yet confirmed your email address. Please check your email inbox — you should find an email from us with a verification link; please click it. [TyEEML0VERIF_] Someone can help with this? Thanks a lot
Hi @German, There was an error (a hard bounce) delivering an email to your mail server (looking at the DNS configuration, seems you're using your own mail server?). Thereafter, the mail delivery SaaS Talkyard's hosting uses, stopped delivering any more emails.
Now I clicked a Reactivate
button in the mail software, ... I'll send you a PM
When I followed the instructions in the starting-talkyard.md document to run talkyard. I got stuck at the nix-shell step.
Here is the output when I start the nix-shell:
error: nodejs_14 has been removed as it is EOL.
(use '--show-trace' to show detailed location information)
Who can help me? Thank you.
(Hi @liuzhili, I'll reply here: Stuck at the starting talkyard)
@KajMagnus Hi there, hoping to make the move from Disqus to Talkyard. Is the approved method to still email an XML dump from Disqus to you to get the json built and imported?
Hi Tim @timmmmyboy yes that's right, the steps are:
- Sign up for a blog comments site (by clicking the leftmost "Free trial" button here: https://blog-comments.talkyard.io/pricing/),
- Configure the blog comments site, and a test page on your blog, so everything seems to work, (& ask for help if needed)
- Email
support @ talkyard .io
with a Disqus XML dump.
(How did you find out about Ty, if I can ask?)
Excellent, I'll work on that today. Appreciate it! I don't remember the origin of when I found out about Talkyard, I'm sure it was from some web searching for Disqus alternatives, particularly as I was looking for something open-source. It may have been mentioned on Reddit. I finally decided to make the jump :)
500 Internal Server Error
Something went wrong: [DwE500REX]
org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateSqlException:
Migration v8__system_user_id_1.sql failed
SQL State : 42704
Error Code : 0
Message : ERROR: constraint "dw2_posts__c_first_rev_by_creator" of relation "posts3" does not exist
Location : db/migration/y2016/v8__system_user_id_1.sql (/opt/talkyard/app/file:/opt/talkyard/app/lib/com.debiki.ty-dao-rdb-v0.2024.011.jar!/db/migration/y2016/v8__system_user_id_1.sql)
Line : 25
Statement : alter table posts3 drop constraint dw2_posts__c_first_rev_by_creator
Getting this migration error while trying to setup talkyard prod version locally
Hi @heshanKaru10, interesting. "Cannot" be the SQL that causes this, but sth else.
Is it a virtual machine in a laptop? How much memory and disk does the VM (?) have, what operating system?
This happens to me sometimes in a VM on my laptop, and then I've been confused for a while, until I shut down lots of applications I wasn't using and restarted the VM, then that error has disappeared (in my case).
Hi @KajMagnus, Basically using docker desktop on windows O/S to deploy the containers. And not using a different VM as well. Can it be because of resources(memory, cpu)
@heshanKaru10 Yes, too little memory was the problem in my case. — I've never started Ty from Docker Desktop though, not impossible something else goes wrong. If you give it more memory, but it still doesn't work, one idea would be to try in a Debian VM?
Hi @KajMagnus, would it be possible to upgrade PostgreSQL to the latest in its series (10.x)? It looks like the current version used in Talkyard suffers from multiple vulnerabilities and it is being red flagged as a result. Thank you and I hope all is well.
@melanopsis Hi, yes I'll have a look. (Note that it's not accessible from outside, only the application server talks with it.)
@KajMagnus It's hard to reason with infosec folks :) The instance that hosts Talkyard is not even directly accessible from the internet.