Stillat / meerkat-statamic3

Meerkat 2 is an extremely powerful and easy-to-use comment platform for Statamic 3.
https://meerkatcomments.com/
Other
5 stars 4 forks source link

Meerkat REPLY form activation #213

Closed CurtisZenFu closed 1 year ago

CurtisZenFu commented 1 year ago

Total newb on Git. Finally joined because I need answers and hope someone can help as there is almost nothing on Google-Fu for this.

Following the docs for Meerkat to the letter. Even setup the "Cool Writings" starter kit to be 100% exact.

I can a) get the submit form working (Integrate Meerkat) and b) get the comment thread loading (The Comment Thread) but...

For the life of me absolutely nothing happens with the stated "Reply Forms" instructions. https://meerkatcomments.com/docs/allowing-visitors-to-reply-to-each-other

All it states is add an |a href="#"| link (where???) with the required passed data fields... but nothing happens. I click the link and it goes exactly where href points to > the top of the page with a "#" is appended to my URL.

Here is my code wrapped in a vanilla div.

`

{{ meerkat:responses }}

{{ comments }}
<ul>
    <li>
        <div>
            <p>{{ author.name }}:</p>
            <p>{{ content }}</p>
            <hr>
            <div>
                <a href="#" data-meerkat-form="reply" data-meerkat-reply-to="{{ id }}">Reply</a>
            </div>    
        </div>
    </li>
</ul>
{{ /comments }}

{{ /meerkat:responses }}

`

Barebones. CSS comes later. I just want to get that reply form to load.

Yes... {{ meerkat:replies-to }} is loaded in the HEAD and shows as such in browser dev tools and I can "load" the min.js file in my browser as well so clearly the server has access to the "replies-to" javascript that should load the form right beneath the comment thread render.

What am I doing wrong?

Thank you in advance,

Total Dev Newb.

JohnathonKoster commented 1 year ago

Hi there!

Can you move this to right before the </body> tag in your template?

{{ meerkat:replies-to }}
CurtisZenFu commented 1 year ago

Son of a.... I was wondering if this was supposed to be inline script. I assumed that if I load it at the top... it would work like my nav script across the whole page (is that not what the head script tag is for?). But it appears because this is page/element specific... it has to load last and execute like a "wait" function on every page as opposed to a site global?

Anyway... it works!!! This newb is mucho happy for the assist. The reply just won't display now... sigh. I will work on that for a bit before asking again.

I must also say the docs for Meerkat and Statamic are pretty good if... you have some minimal coding background. Not hard... but not totally impossible to figure out. That is quite the feat so kudos to the whole team.

JohnathonKoster commented 1 year ago

Glad it's working, and that is great feedback on the docs; I will look at refreshing those soon.

If you run into anything else, feel free to open an issue. I will close this one for now! 😊

CurtisZenFu commented 1 year ago

For sure. Just checked the doc page linked above. Here is what it states now.

'This will create a Githubissues.

  • Githubissues is a development platform for aggregating issues.