-
Notifications
You must be signed in to change notification settings - Fork 25.8k
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 provider configuration inconsistency #2386
Comments
And yes you're right, doesn't look like this was ever fixed in the provider include for staticman_v2 https://github.com/mmistakes/minimal-mistakes/blob/master/_includes/comments-providers/staticman.html#L1 And it should be:
|
@mmistakes - right, but it doesn't work if you follow the docs, although this clear only if you get half way through my bug report. Start from the text So the actual bug to see the actual bug. Essentially, it's the same fix as #2351 but in a different file. Edit: beat me by 4 seconds :) |
The whole thing is a big ball of confusion anyways. v3 is really v2 with custom endpoints. In all honesty support for everything except the current custom endpoint method should be left. I don't think the public instance even works anyways and that would clear up all the issues related to that. |
Correct, although v2 and v3 are pretty similar. I.e., you don't need a different provider for them (v2 will work fine), the only difference really is in the I didn't follow what you meant by "... should be left", do you mean something like "should be removed"? |
Should be left... keep support for it. Pointing people to that solution seems like a disservice since it almost never works anyways. |
I agree, but I guess had troubling parsing this sentence:
I parse it as "the current custom endpoint method should be removed, everything else should be left". By "custom endpoint" I assume you mean using your own endpoint, and not the public instances, so I parsed this as the opposite of what you meant (sorry... don't you get to meet the most annoying pedants on github?). |
Yup 😄 |
Environment
Expected behavior
The staticman configuration implementation and doc seems a bit inconsistent. The configuration doc shows that the
branch
key should be nested undercomments
, i.e., atsite.comments.staticman.branch
:However, in the template _config.yml in master,
staticman
is not nested under comments, but at the top level:I believe this is the way it was supposed to work for staticman v1, because the staticman API bridge lookins in _config.yml for it's own configuration parameters.
However, for
v2
, this stuff goes in a separatestaticman.yml
file. So the actual bug I find is that in the staticman_v2 provider, it is checking the not-nestedsite.staticman.branch
, rather thansite.comments.staticman.branch
:This means if you configure staticman v2, it will be missing the javascript associated with form submission. As it turns out, comment submission will still go through, but you end up getting redirected to the JSON results page of the API bridge, because the default
action
is to do that, when the JS is missing, I guess.Suggested fix:
site.staticman.branch
tosite.comments.staticman.branch
in the v2 provider.comments
the v2 configuration for staticman.Workaround:
To get the comments working in the meantime, you can just include a redundant
staticman.branch
key at the top level so the check in the v2 provider passes, which is what I'm doing:The text was updated successfully, but these errors were encountered: