Staticman: MISSING_CONFIG_FIELDS

Created on 29 Mar 2018  路  2Comments  路  Source: eduardoboucas/staticman

As far as I can tell I've configured the staticman yml file correctly, added a form that has all the required fields and pushed to the branch defined in the ymal configuration (master).

Most of the configuration and form has simply been copied from the staticman site and a few properties changed as appropriate while I am testing it.

However, when posting a comment I get the below error;

{"success":false,"data":["allowedFields","branch","format","path"],"rawError":{"_smErrorCode":"MISSING_CONFIG_FIELDS","data":["allowedFields","branch","format","path"]},"errorCode":"MISSING_CONFIG_FIELDS"}

My repo is https://github.com/garfieldmoore/garfieldmoore.github.io

and the comment form is in the _includes directory (comments.html)

Could you help as I have checked the configuration a few times.

thanks,

Most helpful comment

this is the url I had to change my form action to;

action="https://api.staticman.net/v2/entry/garfieldmoore/garfieldmoore.github.io/master/comments">

previously I had set it to;
action="https://api.staticman.net/v2/entry/garfieldmoore/garfieldmoore.github.io/master">

The 'comments' part is the name of the top level field in the staticman.yaml file.

All 2 comments

I've fixed this now. The url for the form on the staticman docs site is;
https://api.staticman.net/v2/entry/{GITHUB USERNAME}/{GITHUB REPOSITORY}/{BRANCH}/{PROPERTY (optional)}

The optional property should be set to the top level property in the yaml - in this case comments (as it was taken from the sample staticman.yaml.

Therefore, changing my form to the below snippet fixed this issue;

this is the url I had to change my form action to;

action="https://api.staticman.net/v2/entry/garfieldmoore/garfieldmoore.github.io/master/comments">

previously I had set it to;
action="https://api.staticman.net/v2/entry/garfieldmoore/garfieldmoore.github.io/master">

The 'comments' part is the name of the top level field in the staticman.yaml file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Isaac-Tait picture Isaac-Tait  路  5Comments

lisandroct picture lisandroct  路  7Comments

jkbecker picture jkbecker  路  5Comments

rskupnik picture rskupnik  路  7Comments

clairity picture clairity  路  12Comments