Forum
Questions/ issues with Perch forms
Hi, I have got a contact form basically working in Perch, but am still running into a few issues. It seems to me that I've run into some bugs here, but you'll have to let me know what you think about that.
When I log in to Perch, and go to the Forms page (title: 'Listing Forms'), I see 3 forms, all called the same thing ('ContactForm'), and all with an identical number of responses listed. Why are there 3 identical forms listed here? My intention is to have one contact form available across the website, the form submitted from different pages on that site, but with all submissions coming together in a single place.
When I then click on one of these forms to see the responses, I seem to hit a bug. Hitting 'view response' for any message displays the same message - one sent 11/07/2018, a seemingly spammy message (it's in Russian script, with a web url). What's going on here? Possibly related, the response numbering is weird - it lists multiple messages as #0. However - clicking 'download csv' does return the correct responses, so the form responses are being stored in Perch, just not output properly via the Form Responses screen.
Finally - I have had trouble with spam submissions. I want to check: in order for Akismet to work on my Contact Form, I need to put the Akismet key in the Blog settings of Perch - is that right? i.e., I am checking there is no Form settings of Perch somewhere that I need to add the Akismet key to. As I understand it, I also need to add "antispam=..." to the perch input tags on the Contact Form. Then is that sufficient to get the antispam working? Is there then any way that I can check Akismet is working, or test it out?
Thanks for your help. Let me know if you need screen shots or any additional information on the above.
Could you post your diagnostics report please?
Hi Drew, thanks for your reply and my apologies I've taken so long to see it! Diagnostics report follows:
Health check Perch is out of date. You are running Perch 3.0.14 and the latest is 3.1.2. Update instructions PHP 5.6.24 is up to date MySQL 5.6.41 is up to date Image processing available Summary information Perch: 3.0.14, PHP: 5.6.24, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (3.0.14), assets (3.0.14), categories (3.0.14), perch_blog (5.6.1), perch_forms (1.11) App runtimes: <?php $apps_list = array( 'perch_blog', 'perch_forms', ); ?> PERCH_LOGINPATH: /perch PERCH_PATH: /home/whiterosevisas/public_html/perch PERCH_CORE: /home/whiterosevisas/public_html/perch/core PERCH_RESFILEPATH: /home/whiterosevisas/public_html/perch/resources Image manipulation: GD Imagick PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M F1: 3b606135b33e6a102526838f4152a807 Resource folder writeable: Yes DOCUMENT_ROOT: /home/whiterosevisas/public_html HTTP_HOST: www.whiterosevisas.co.uk REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
First thing I'd suggest is making sure you're running the current version of Perch and Forms.
OK, thanks Drew, I'll do that and then get back to you.
Hello Drew, an update: I have updated the Perch app and the Forms add-on to the latest versions. Everything is now up to date as far as I'm aware. Returning to the 3 issues listed in my first post ... #1 and #2 are still problematic - the updates have made no change there. And question #3 still stands. I look forward to your further advice. Thanks, Mark
When you submit a new response, is it added to all three instances?
Yes, I have checked again today - the latest response went to all three instances.
As per my initial post, note that this latest response is NOT properly visible in the 'Form Responses' list (in any of the three instances). There is instead a weird dummy/ spam response listed. The Response has a number of #0 (along with loads of other form responses), correct date and time, and when you click on on Detail/ View Response it gives erroneous detail - spammy detail, as per my initial post. (It might be useful to attach a screen shot to show what I mean - is that possible in this forum?)
However, the latest response IS viewable in the downloadable csv - and in that case it is visible for all three form instances.
Can you turn on debug for your page, submit the form, and then let me know what it outputs at that point? Needs to be immediately after the form is posted.
Here you go Drew, hopefully this gives you what you need:
Debug Message - Perch 3.1.2 [1] SELECT u.*, r.* FROM perch3_users u, perch3_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='611bbe302d0af40babb6cb07404cf851' LIMIT 1 UPDATE perch3_users SET userHash='bf88ab4f43c0b6929bf510b6553d24f3' WHERE userID='1' [31] SELECT settingID, settingValue, userID FROM perch3_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC [8] SELECT itemValue FROM perch3_menu_items WHERE itemType='app' [1] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1 [3] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC [1] SELECT itemTitle FROM perch3_menu_items WHERE itemType='app' AND itemValue='settings' LIMIT 1 [1] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10 [2] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC File: /core/settings/modes/diagnostics.post.php Queries: 10 Memory: 3.1584
That looks like the debug output from the Settings section in the Perch control panel.
Submit the form on your page and show me the diagnostics from there. That's the only one that's going to give any information about the posting of the form.
Hi Drew, sorry about that, I misunderstood. The following should be what you need:
So that looks like it's adding a response to the form with the ID
2
but no others. Is that response appearing against multiple forms? If so, which?Yes, that response is appearing against all three forms. In fact, all three forms have identical responses. In other words, if I click Export for each form, and examine the resulting .csv file, all files are exactly the same.
Let me know if you need any other screenshots or info. Thanks.
Do the three forms all have identical control panel URLs?
Yes they do! They all have the URL /perch/addons/apps/perch_forms/responses/?id=2 (therefore matching the ID number that you spotted earlier)
Ok, so the issue is simply that you have (somehow) got duplicate links on that listing page. There's no actual duplicate data.
Great. In that case, what's the best way to fix this?
Should I just click 'Delete' on 2 of the 3 forms? Would that delete the duplicate links - or is there a chance that it would delete the underlying form and data? (Which obviously I do not want to do.)
Those are all the same, so that would delete the one form.
Ok, understood. So I shouldn't click delete on that form. In that case, is there any way of solving this duplicate issue?