Closed wottpal closed 7 years ago
This is a great use for hooks, thanks for sharing! I think you want to change this line:
$gitHelper->kirbyChange("commented on ".$commentPage->uri());
to this:
$gitHelper->kirbyChange("commented on ".$comment->page()->uri());
This shows the difference between $commentPage
and $comment->page()
:
content/
ββ blog/
ββ 1-hello-world/ <- $comment->page()
ββ post.txt
ββ comments/
ββ comments.txt
ββ 1-comment-1/ <- $commentPage
β ββ comment.txt
ββ 2-comment-2/
β ββ comment.txt
ββ 3-comment-3/
ββ comment.txt
Not blocking the page load sounds like a good idea but I donβt know if this can be done with Queue for Kirby as I have never used it.
I have to close this issue because it isnβt actionable. I am planning to publish a cookbook for Kirby Comments (inspired by Kirbyβs cookbook) where I will include this snippet.
Just for reference, after some minor issues I got everything working asynchronously with a queue and a cronjob. π I posted my solution here: https://github.com/sebsel/queue-for-kirby/issues/3#issuecomment-341974133.
Just a little thank you for the ongoing efforts you put into this nice plugin. I am using it on my new personal site (e.g. here)! Transition to 1.5 was smooth and I will try out some things with Custom Fields & Nested Comments in the future.
I already re-implemented pushing to my remote repository (with the gcap-plugin) with one of the new Hooks. I just wanted to post my solution here if anyone else is in need for this:
One thing which could be improved though is the loading time. After somebody made a comment it gets pushed & commented synchronously which definitely slows down the page-load. Any idea here? Maybe I should use something like Kirby Queue by @sebsel...
Happy Halloween ππ§ββοΈπ§ββοΈ