Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staticman no longer allows comments #2170

Closed
justinrummel opened this issue May 26, 2019 · 17 comments
Closed

Staticman no longer allows comments #2170

justinrummel opened this issue May 26, 2019 · 17 comments

Comments

@justinrummel
Copy link
Contributor

Environment

  • Minimal Mistakes version: 4.16.3
  • Ruby gem or remote theme version: n/a
  • Jekyll version: n/a
  • Git repository URL: justinrummel/jr.com-mm
  • GitHub Pages hosted (if yes provide URL to site): No
  • Operating system: n/a

Expected behavior

Currently not able to post comments.

Steps to reproduce the behavior

It appears that Staticman is enforcing CORS, and current MM sites that use Staticman can no longer post comments. Confirmed this is also impacting your own site.

@mmistakes
Copy link
Owner

Have you filed an issue on Staticman's repo to track?

@justinrummel
Copy link
Contributor Author

Working on the research now, posting mostly for awareness....

@mmistakes
Copy link
Owner

mmistakes commented May 26, 2019

Curious to see what changed on Staticman's end if anything. Looking at the repo dev branch was last updated 4 months ago and master 2 months.

Wonder if where they host changed something? Guess this is another reason to host your own instance vs. using the public Staticman endpoint.

@justinrummel
Copy link
Contributor Author

Confirmed solution at github.com/eduardoboucas/staticman/issues/278#issuecomment-475170669. Need to update from dev.staticman.net to api.staticman.net for v3.

I've tried to figure out how to host my own instance several times and failed every single time. If you figure it out and document, I'd be happy to verify the directions.

@mmistakes
Copy link
Owner

Nice. Was wondering when the dev instance would stop working.

Thanks for digging into it.

@justinrummel
Copy link
Contributor Author

Wonder if this line needs to be updated for v3

<form id="new_comment" class="page__comments-form js-form form" method="post" action="{{ site.staticman.endpoint | default: 'https://api.staticman.net/v2/entry/' }}{{ site.repository }}/{{ site.staticman.branch }}/comments">

@mmistakes
Copy link
Owner

Shouldn't need to change. The endpoint for v3 is set in the config. Just need to switch from dev to api there.

@mmistakes
Copy link
Owner

@justinrummel Not sure if you experienced this one yet, but the dreaded "Too many requests" error is happening again once switching to api.staticman.net v3 instead of using dev.staticman.net.

Looks like even with using a GitHub application there's still some sort of API limit Staticman is hitting and comments don't go through.

There's this issue if you want to track any developments eduardoboucas/staticman#279

@deadlydog
Copy link
Contributor

deadlydog commented Jun 14, 2019

Curious if you're going to make staticman v3 a first-class citizen or not? Right now in the _config.yml it only calls out staticman and staticman_v2:

comments:
  provider               : # false (default), "disqus", "discourse", "facebook", "staticman", "staticman_v2", "utterances", "custom"

I can submit this as a separate issue if you'd like?

@deadlydog
Copy link
Contributor

I just found issue #2036 and left a comment on it to see if we could get it reopened regarding adding staticman v3 support.

@mmistakes
Copy link
Owner

@deadlydog I don't have any plans to change how Staticman is enabled in the theme. With all it's issues the last year I'm not really motivated to until it stabilizes.

Even the new v3 GitHub application endpoint is having it's issues. Calling it out as an official comment solution for the theme has only brought more attention to it and put me in a support role for when it goes bad.

@deadlydog
Copy link
Contributor

Having the link you provided in #2036 does effectively show how to use staticman v3 with minimal configuration changes, and is just what I was looking for 👍

@VincentTam
Copy link
Contributor

@deadlydog I don't have any plans to change how Staticman is enabled in the theme. With all it's issues the last year I'm not really motivated to until it stabilizes.

Even the new v3 GitHub application endpoint is having it's issues. Calling it out as an official comment solution for the theme has only brought more attention to it and put me in a support role for when it goes bad.

Under Staticman v3, no matter how the Node.JS code inside the app changes, I don't think the URL scheme (i.e. input) and the rendered output YML file structure would change. Provided that this theme's integration works well with a self-hosted Staticman v3 instance, nothing much can be done by a static blog theme, apart from offering advices in documentations/README.

Btw, I suggest using an alternative/self-hosted Staticman API instance to avoid unexpected interruption of static comments service due to unnotified update on the main public production/testing Staticman API instance, say in eduardoboucas/staticman#283. You might refer to my post for self-hosting Staticman if interested.

P.S. I wrote the linked docs for Staticman v3, and I built @staticmanlab.

@andreigi
Copy link

@deadlydog I don't have any plans to change how Staticman is enabled in the theme. With all it's issues the last year I'm not really motivated to until it stabilizes.

Even the new v3 GitHub application endpoint is having it's issues. Calling it out as an official comment solution for the theme has only brought more attention to it and put me in a support role for when it goes bad.

Glad to know I read this before using Staticman on my own site.

@justinrummel
Copy link
Contributor Author

Thanks @VincentTam

I'll take a look at your blog post again and try to follow the directions. If there are spots that I feel are unclear I'll reach out to you.

@mmistakes
Copy link
Owner

Seems like the best approach these days is to fork the Staticman repo and spin up your own instance on a free Heroku plan.

Closing as there’s nothing the theme can do about improving the reliability of the public endpoint.

@VincentTam
Copy link
Contributor

Seems like the best approach these days is to fork the Staticman repo and spin up your own instance on a free Heroku plan.

Staticman's maintainer has recommended users to set up their own API instance: eduardoboucas/staticman#317 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants