You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to get the full path in my slug, so I added a '/' between "post" and the last part of the URL. The error I see in the console is:
error message = path contains a malformed path component: {"resource":"Commit","field":"path","code":"invalid"}
SyntaxError: Unexpected token p in JSON at position 0
at JSON.parse (<anonymous>)
at /Users/james/Dev/hugo/staticman/lib/GitHub.js:114:38
at processTicksAndRejections (internal/process/task_queues.js:95:5)
I added the log statement on GitHub.js line 112 to see why the JSON.parse(message) was not working properly. I think the code may need to be modified to split the message apart from the JSON object so the JSON object can be properly parsed. Hope this helps.
To replicate, use this for your slug <input type="hidden" name="options[slug]" value="{{ replaceRE "/$" "$1" $.RelPermalink }}">
I recognize what I'm trying to do may not be correct, but this issue is about the error handling part. Hope this helps.
The text was updated successfully, but these errors were encountered:
I wanted to get the full path in my slug, so I added a '/' between "post" and the last part of the URL. The error I see in the console is:
I added the log statement on GitHub.js line 112 to see why the
JSON.parse(message)
was not working properly. I think the code may need to be modified to split the message apart from the JSON object so the JSON object can be properly parsed. Hope this helps.To replicate, use this for your slug
<input type="hidden" name="options[slug]" value="{{ replaceRE "/$" "$1" $.RelPermalink }}">
I recognize what I'm trying to do may not be correct, but this issue is about the error handling part. Hope this helps.
The text was updated successfully, but these errors were encountered: