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 v2 stopped working #1590

Closed
1 of 6 tasks
lsolesen opened this issue Mar 19, 2018 · 5 comments
Closed
1 of 6 tasks

Staticman v2 stopped working #1590

lsolesen opened this issue Mar 19, 2018 · 5 comments

Comments

@lsolesen
Copy link
Contributor

lsolesen commented Mar 19, 2018

  • This is a question about using the theme.
  • This is a feature request or enhancement.
  • I believe this to be a bug with the theme.
    • I am using the latest version of the theme.
    • I have updated all gems with bundle update.
    • I have tested locally with bundle exec jekyll build.

The Staticman v2 used to work correctly up until two days ago where this was added, vih/historie@2f654c1 - and as far as I can tell, I have not made any breaking changes since. https://github.com/vih/historie/commits/gh-pages

I get this - which seems to be related to https://github.com/mmistakes/minimal-mistakes/blob/master/_includes/comments.html#L80 - where [reCaptcha][siteKey] is also part of the form.

´´´
"{"success":false,"data":["hidden"],"rawError":{"_smErrorCode":"INVALID_FIELDS","data":["hidden"]},"errorCode":"INVALID_FIELDS"}"
´´´


Environment informations

  • Minimal Mistakes version: 4.10.1
  • Jekyll version:
  • GitHub Pages hosted: yes
  • Operating system:

Expected behavior

I was expecting the comments with staticman v2 to work - but it seems I get a 500 from staticman, when I inspect the network through Chrome webmaster tools.

Steps to reproduce the behavior

Only difference from the original theme staticman.yml is the recaptcha stuff here:

https://github.com/vih/historie/blob/gh-pages/staticman.yml#L97

@mmistakes
Copy link
Owner

If it was working for you and you made no changes then it's likely something on Staticman's side. I don't control that so you might want to inquire with the project on GitHub.

@lsolesen
Copy link
Contributor Author

Did a little more digging - and it could be related to the minimal mistakes.

I get this - which seems to be related to https://github.com/mmistakes/minimal-mistakes/blob/master/_includes/comments.html#L80 - where [reCaptcha][siteKey] is also part of the form.

´´´
"{"success":false,"data":["hidden"],"rawError":{"_smErrorCode":"INVALID_FIELDS","data":["hidden"]},"errorCode":"INVALID_FIELDS"}"
´´´

@lsolesen
Copy link
Contributor Author

Also wonder if it has something to do with: eduardoboucas/staticman@28caae6

@mmistakes
Copy link
Owner

Maybe. Could probably wrap those lines in a Liquid conditional, but Staticman shouldn't care if you send extra data.

The only time I see it fail is when you try to submit a form with missing required fields, as defined in the Staticman config. These recaptca lines aren't required.

@mmistakes
Copy link
Owner

mmistakes commented Mar 19, 2018

I believe it's related to changes occurring on the Staticman repo. I haven't touched the MM demo site or anything related to Staticman comments and it's failing there too.

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

2 participants