No internet connection
  1. Home
  2. Support

Hugo SaaS Integration

By Lief Koepsel @lkoepsel
    2021-06-10 17:05:32.967Z

    I'm adding Talkyard to a Hugo site and haven't been able to display comments. At the bottom of this entry:
    https://wellys.com/posts/arduino_hal/
    you can see the Comments powered by... however, there isn't anything else, such as a comment box.
    I've no doubt I haven't integrated Talkyard correctly, however I've run out of things to change.

    Thanks,
    Lief

    • 6 replies
    1. Hi Lief, I had a look at the page, and in the HTML source, there's this:

      
      <script>talkyardServerUrl='';</script>     <——
      <script async defer src=""></script>    <——
      
      <div class="talkyard-comments" data-discussion-id="arduino_hal" style="margin-top: 45px;">
      <noscript>Please enable Javascript to view comments.</noscript>
      <p style="margin-top: 25px; opacity: 0.9; font-size: 96%">Comments powered by
      <a href="https://www.talkyard.io">Talkyard</a>.</p>
      </div>
      

      However those two <script>...</script> lines instead needs to be, in your case:

      <script>talkyardServerUrl='https://wellys.talkyard.net';</script>
      <script async defer src="https://c1.ty-cdn.net/-/talkyard-comments.min.js"></script>
      
      1. LLief Koepsel @lkoepsel
          2021-06-11 13:36:20.607Z

          Thank you, KajMagnus. That points me in the right direction. I moved the params, up out of a comments block from the theme and made a little progress...

          I'm now getting a string of errors in JS, such as this one:
          Blocked a frame with origin "https://wellys.talkyard.net" from accessing a frame with origin "https://wellys.com". Protocols, domains, and ports must match.
          slim-bundle.min.js:10:250429

          1. I had a look, it seems you've configured things correctly.

            I'll have a look at this tomorrow. I think there might be a problem when Approval Required is combined with embedded comments.

            Looking in Dev Tools, I noticed that Talkyard incorrectly sends a Redirect response to a login page, instead of showing the comments.

            1. Hi again Lief @lkoepsel , if you disable this setting:

              Approve users
              New users need to be approved by staff before they can do anything more than just reading.

              then it should work. You can do that in the Admin Area, the Settings | Signup and Login tab: https:// your Ty site /-/admin/settings/login. (Or I can do that, if you want.)

              The problem is that currently Approve users also means "login required" — I need to change that (in a backwards compatible way, so won't be any surprises for already existing sites that maybe relies on this).

              (Currently, because Approve Users is enabled, Ty tries to redirect the blog visitors to a page where they can log in — instead of showing the comments.)

              1. LLief Koepsel @lkoepsel
                  2021-06-14 12:58:38.969Z

                  Yes! It worked!

                  The buttons "Reset to Default" are very handy for backing back out of changes. I went ahead and reset many of my settings to default and I'll change them as I see issues or a need to change.

                  Thank you,
                  Lief

                  1. Ok I'm glad it worked :- )

                    I went ahead and reset many of my settings to default

                    (Oh I think it's just that one specific setting that has an unclear / actually-slightly-misleading description (I'll add a note now about fixing that). The others should work fine)

                    (I marked this topic as done now b.t.w.)

          2. Progress
            with handling this problem
          3. @KajMagnus marked this topic as Done 2021-06-17 03:04:48.407Z.