Skip to content

[BUG] Staticman 405 error #1

Open
@VincentTam

Description

@VincentTam

Description

Staticman form submission failed

Steps to reproduce

Fill in the comment form in https://fahimscirex.github.io/post/journal/capernaum/.

options[slug]: postjournalcapernaum
options[parent]: 
fields[comment]: Test my XHR ` send`  method.
fields[name]: Vincent Tam
fields[email]: [email protected]
fields[website]: https://vincenttam.gitlab.io

Click "submit".

Expected output

The page displays the submit success message.

Error received

I received a response with error 405.

<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
</body>

Screenshot

Screenshot displaying web dev tools

Analysis

The request URL displayed in my web browser's web dev tool is incorrect.

https://fahimscirex.github.io/post/journal/capernaum/%7B%7B%20.api%20%7D%7D

Git* Pages only supports static web host. The copies saved on Git* server can't respond to users' requests.

You've made a typo in the customizing the URL for your API instance.

api = "https://staticman-scirex/v3/entry/github/fahimscirex/fahimscirex.github.io/master/data/comments"

The use of action in an HTML might feed the URL of your API instance to search bots. I made merged PR daattali/beautiful-jekyll#521 to address this problem. Please consider including that into your code.

<form class="js-form form" method="post" action="{{ .Site.Params.staticman.api }}">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions