-
Notifications
You must be signed in to change notification settings - Fork 3
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
[BUG] Staticman 405 error #1
Comments
Sorry, I'm a newbie here. Didn't understand about the typo. Can you elaborate that? |
And I've moved to Hugo. So that merge won't work here I guess? |
I've created a PR for that.
Beautiful Hugo is actually the theme for my personal blog. I've submitted some PRs for fun. Some minor ones got merged, and some might be obsolete or too big to get merged, and the rest are version updates like upgrading KaTeX and replacing outdate jQuery with latest stable version of jQuery slim. I've tweaked it in the way I want on GitLab. (demo) In the official demo, the POST URL is set using the |
use `{{ .Site.Params.staticman.api }}` instead of `{{ .api }}` fixes #1
ℹ️ I ran the test before your updates. Thanks for accepting my PR, but it's still giving errors.
If you open your browser's web dev tool, you might see two requests, one in error and one in 200. The one in 200 corresponds with "options" as request method. I don't expect that to happen. Despite the "OK" message, the form submission actually fails. The red line in the above screenshot suggests the actual XHR request sent resulted in an error. It seems that your Staticman instance might be down for a while. As I reported in halogenica/beautifulhugo#342, the theme isn't using an up-to-date jQuery.
The blog is derived from Beautiful Jekyll, for which I've contributed to its Staticman integration. The Jekyll theme's author @daattali has switched to the latest slim version of jQuery (despite daattali/beautiful-jekyll#766). That motivated me to follow suite for Beautiful Hugo. As a result, I've submitted halogenica/beautifulhugo#380. Note that I wrote my script fahimscirex.github.io/static/js/staticman.js Lines 39 to 49 in 0ad71f0
For example, the CSS class fahimscirex.github.io/layouts/partials/staticman-comments.html Lines 65 to 82 in 0ad71f0
You might want to want to have a look at the current version of my comment form and the above GIF to visualize the actual user interface. |
Updated: despite the latest commit fahimscirex.github.io/config.toml Lines 117 to 118 in edd59a7
the Heroku app is still unavailable. |
Okay. So looks like the Heroku app is available only from my system. When I removed the RSA config variable from repo I got an application error. How can I make the app available for all? |
For back-end Staticman problems, it's better asked in its official repo. In a Git* repo for a blog theme which implements Staticman integration, we deal with questions about the theme's template code which enables interactions between the static website and a Staticman API. More concretely, we deal with questions and problems like:
Note that these discussions depend on a working API instance. |
Description
Staticman form submission failed
Steps to reproduce
Fill in the comment form in https://fahimscirex.github.io/post/journal/capernaum/.
Click "submit".
Expected output
The page displays the submit success message.
Error received
I received a response with error 405.
Screenshot
Analysis
The request URL displayed in my web browser's web dev tool is incorrect.
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.
fahimscirex.github.io/config.toml
Line 118 in 97a9e5d
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.fahimscirex.github.io/themes/beautifulhugo/layouts/partials/staticman-comments.html
Line 38 in 0ad71f0
The text was updated successfully, but these errors were encountered: