Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Turnstile: "RuntimeException No secret provided"

Started by Veehem 2 years ago · 2 replies · 450 views
2 years ago

A follow-up question on my previous post about RecaptchaContact.

Thank you @hughbris I've created a Turnstile account and put the 2 keys in the Plugin: Form but by FTP, I don't see any form.yaml in the folder user/config/plugins
Do I have to created there manually with this settings?

YAML
turnstile:
  theme: light
  site_key: <Your Turnstile Site Key>
  secret_key: <Your Turnstile Secret Key>

And after that, the form.md related to my Contact Page will work? Actually, I've a error :

TXT
Captcha failed for this form, please try again
last edited 01/01/24 by Veehem
2 years ago

@veehem:
put the 2 keys in the Plugin: Form but by FTP, I don’t see any form.yaml in the folder user/config/plugins

I don't really understand what you are saying here. Could you rephrase it please?

One tip is to make you set your Turnstile "Widget Mode" in settings for that site to "Non-interactive". Then you can see more. You can change it when it works.

2 years ago

Thanks @hughbris for your help
I'll rephrase (sorry I'm not an expert & I'm mainly working by the admin panel)

1/ I've my keys from turnstile

2/ I've created a page (template form) and as explaining here, I've put this code

YAML
form:
    name: contact
    fields:
        name:
            label: Name
            type: text
            validate:
                required: true
        email:
            label: Email
            type: email
            validate:
                required: true
        message:
            label: Message
            type: textarea
            validate:
                required: true
        captcha:
            type: turnstile
            theme: light
    buttons:
        submit:
            type: submit
            value: Submit
    process:
        turnstile: true
        email:
            subject: '[Acme] {{ form.value.name|e }}'
            reply_to: '{{ form.value.name|e }} <{{ form.value.email }}>'
        message: 'Thanks for contacting us!'
        reset: true
        display: /
media_order: poste.jpg
---

![poste](poste.jpg "poste")

3A/ I've put my keys by the Admin Panel in the form plugin but when I've a look by FTP to my folder /user/config/plugins there is no `form.yaml'

3B/ Then following this page
I've created a `form.yaml' with this code

YAML
turnstile:
  theme: light
  site_key: <Your Turnstile Site Key>
  secret_key: <Your Turnstile Secret Key>

But my page stay in error

PS1: for my learning site_key: <Your Turnstile Site Key> means site_key: 123456 or site_key: <123456> I've tried both
PS2 This page mention that it's better to put form in modular pages . But it seems this is outdated because the instruction is to get it from "from Antimatter, the default Grav theme" which seems a old default theme.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 85 13 hours ago
General · by pamtbaau, 18 hours ago
1 60 17 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 350 5 days ago
General · by Duc , 6 days ago
3 44 5 days ago