Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: ee harbour FORMS (DevDemon Forms) snaptcha not active
Status | Resolved |
Add-on / Version | Snaptcha 3.2.3 |
Severity | |
EE Version | 7.3.15 |
Julius Lipp
Jan 26, 2024I installed snaptcha and activated it in the settings. On the page where a form (ee harbour FORMS) is placed, when looking at the sources in devmode, I can’t find a field with the ID “snap”. In previous versions the support for “devdemon Forms” had to be set in one of the snaptcha files with “yes”, I think this is not more the case in the newer versions and it should work out of the box?
BoldMinded (Brian)
Hi, Julius. When I acquired Snaptcha there were no real functional updates required. If it doesn’t work out of the box, then you’ll need to follow the docs and add the necessary field/tag to the form.
Julius Lipp
Comment has been marked private.
Julius Lipp
Comment has been marked private.
BoldMinded (Brian)
I don’t know what or if anything has changed with the Forms module, e.g whatever “snaptcha support” you’re talking about. If that is something that no longer works or was removed from Forms then I can’t help with that. My suggestion is to use the form tag pair or create a support ticket with EE Harbor. I don’t see anything in the Snaptcha codebase, or it’s Git history, to suggest it has ever done anything special to handle the Forms module automatically.
Julius Lipp
Comment has been marked private.
BoldMinded (Brian)
Regarding the docs mentioning DevDemon forms, yes it does mention that, but it’s not implying that Snaptcha support also includes DevDemon Forms support. The Forms module is injecting code itself in an attempt to work with Snaptcha, which it could be doing incorrectly, I have no idea.
The error message in the screenshot also doesn’t reveal what the actual error is… it’s an empty bullet point with no error message.
Have you tried, as a debugging step, creating a form using the tag pair, and adding the exp:snaptcha:field tag inside the form manually to see if it works that way?
Julius Lipp
There is no example in the ee harbor docs online how to do that with a tag pair. ’ What I could read out of the actual FORMS docs is, that the following should work but it does not. It just renders nothing…
When doing it with the one tag version ({exp:forms:form form_name=”testform”}) and setting the snaptcha support to “yes” in the addon.setup.php file I get the following error:
BoldMinded (Brian)
What does your Snaptcha settings look like? Can you please share a screenshot? What version of PHP are you using?
BoldMinded (Brian)
The reason I ask for a screenshot of the Snaptcha settings page is that error message implies to me that the settings were never saved.
Julius Lipp
Will Share the screenshot im a second PHP Version 8.1.24
Thanks for helping!
Julius Lipp
Comment has been marked private.
BoldMinded (Brian)
That’s fine, the attachments are only visible to you and I.
So even with those settings you’re still getting that error on line 53?
Can you share a copy of the Forms module? Pasting a link in a private comment to a zip download would be fine. I don’t have a copy of it so I can’t debug it.
Julius Lipp
Comment has been marked private.
BoldMinded (Brian)
Where do you see the settings in Forms for Snaptcha? I don’t see anything in the admin or in the docs.
Julius Lipp
In the addon-setup.php
BoldMinded (Brian)
I see the issue. Forms is accessing the snaptcha_field function directly, and I changed how the settings are loaded in the latest version. Instead of sending a whole new file, update the beginning of the snaptcha_field() function on line 55 or so of ext.snapchat.php to be this:
Julius Lipp
Comment has been marked private.
BoldMinded (Brian)
Have you tried Snaptcha with a native ExpressionEngine form and taken Forms out of the equation? The error message isn’t displaying anything helpful, it’s just saying there is an error. Since I haven’t received any similar reports about Snaptcha in a long time it seems unlikely there is a broad bug/issue with Snaptcha. Until a helpful error message is revealed, I have to assume something is going on with the Forms module, not Snaptcha.
Try making other EE forms… login, logout, email submission etc… with Snaptcha and see what happens.
Julius Lipp
Comment has been marked private.
BoldMinded (Brian)
I’m going to set this as resolved as the change I suggested above was confirmed to work with Forms by the EE Harbor team. I’ve been in contact with them, and if anything else comes up to indicate that Snaptcha is the issue we can re-open this ticket and proceed.
Julius Lipp
Sorry Brian, want to let you know, that the snaptcha hidden field is not injected in a native login form for example. Would this be an ee or a snaptcha thing then?
BoldMinded (Brian)
You might have to explicitly add the snaptcha field to the form.
Julius Lipp
Ok, again trouble also with the native form.
As you mentioned I created a native login form with the manual addition of then snaptcha field like this:
The snaptcha input field is injected! I am doing the test (deleting the input field via dev tools) like mentioned in the docs (under “Testing Snaptcha”) here: https://docs.boldminded.com/snaptcha/docs/configuration . The error message is not shown! I don’t know if it works or not…
BoldMinded (Brian)
Sorry, I shouldn’t have mentioned the login form b/c it doesn’t work with the login form. The supported forms are listed in the docs: https://docs.boldminded.com/snaptcha/docs/configuration#using-snaptcha
There are some newer hooks in EE’s login and registration forms that might have come along after Snaptcha was initially released, and the previous developer might not have kept it up-to-date. I’ll take a look at adding those forms to the supported list, but it could take some time (days or weeks).
BoldMinded (Brian)
Comment has been marked private.
Julius Lipp
Comment has been marked private.
BoldMinded (Brian)
What version of php are you using?
You might need to share a copy of Forms so I can test locally. Logging into someone else’s site is the absolute last thing I do and only if 100% necessary.
BoldMinded (Brian)
The fact that the error page shows a generic message and nothing in the bullet point is concerning. It should show an error in the bulleted list. Please share a screenshot of your Snaptcha settings page.
Julius Lipp
Comment has been marked private.
Julius Lipp
Comment has been marked private.
BoldMinded (Brian)
I can’t see the screenshot, I see the zip file though. Can you add a link to the screenshot in another comment.
Julius Lipp
By Img1, I meant the FIRST image here in the ticket. I did overwrite the first image…
BoldMinded (Brian)
Comment has been marked private.
Julius Lipp
Finally! I think, that did it. My testform is now working and testable like mentioned in the snaptcha docs. What was the problem?
Thanks a lot Brian.
BoldMinded (Brian)
Since Forms interacts with Snaptcha directly it wasn’t loading the settings correctly after I recently changed how the settings were saved.
Glad to hear that fixed it!