Forum

Thread tagged as: Problem, Events, Forms

add-on Forms and Event apps do not show up

The contact form was showing up although the form submission never went through.

https://dev.uppercumberlandtennis.org/

Stacey Plant

Stacey Plant 0 points

  • 5 years ago

Home page DEBUG

SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='32e133525163803af98a28a02f45a926' LIMIT 1
UPDATE perch2_users SET userHash='1577138a93d70a3cf6ba4f76eede4d6f' WHERE userID='1'
[31] SELECT p.privKey FROM perch2_user_privileges p
[18] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[1] SELECT * FROM perch2_pages WHERE pageID=1 LIMIT 1
[2] SELECT * FROM perch2_content_regions WHERE pageID=1 AND regionPage!='*' ORDER BY regionOrder ASC
[1] SELECT COUNT(*) FROM perch2_content_items WHERE itemJSON!='' AND regionID=4 AND itemRev=10
[1] SELECT COUNT(*) FROM perch2_content_items WHERE itemJSON!='' AND regionID=9 AND itemRev=3

Contact Form DEBUG

SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='194c9b20956b669586dfe67a064d2754' LIMIT 1
UPDATE perch2_users SET userHash='e0401618dcc4b2f6a1c06bb1aba4378c' WHERE userID='1'
[31] SELECT p.privKey FROM perch2_user_privileges p
[18] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[1] SELECT * FROM perch2_content_regions WHERE regionID=9 LIMIT 1
[1] SELECT * FROM perch2_pages WHERE pageID='1' LIMIT 1
[1] SELECT * FROM perch2_content_items WHERE regionID=9 AND itemRev=3 ORDER BY itemOrder ASC
[1] SELECT * FROM perch2_content_items WHERE regionID=9 AND itemRev=3 ORDER BY itemOrder ASC
Using template: /templates/content/contactus.html
Form not posted or did not validate
Queries: 9

Event Debug Message

[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='c761b6e246084a2c56d05b3212d9a5dc' LIMIT 1
UPDATE perch2_users SET userHash='c87ffb59b9cdb77fedc11e271f972a20' WHERE userID='1'
[31] SELECT p.privKey FROM perch2_user_privileges p
[18] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[1] SELECT * FROM perch2_content_regions WHERE regionID=4 LIMIT 1
[1] SELECT * FROM perch2_pages WHERE pageID='1' LIMIT 1
[1] SELECT * FROM perch2_content_items WHERE regionID=4 AND itemRev=10 ORDER BY itemOrder ASC
[1] SELECT * FROM perch2_content_items WHERE regionID=4 AND itemRev=10 ORDER BY itemOrder ASC
Using template: /templates/content/featured_event.html
Form not posted or did not validate
Queries: 9
Perch: 2.8.29
Production mode: Production (100)
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_events (1.9.2), perch_forms (1.8.3), perch_members (1.5)
DB driver: PDO
DB tables: perch2_categories (5), perch2_category_counts (0), perch2_category_sets (2), perch2_content_index (98), perch2_content_items (12), perch2_content_regions (2), perch2_events (1), perch2_events_categories (4), perch2_events_to_categories (1), perch2_forms (0), perch2_forms_responses (0), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (1), perch2_pages (1), perch2_resource_log (0), perch2_resource_tags (0), perch2_resources (0), perch2_resources_to_tags (0), perch2_settings (18), perch2_user_passwords (1), perch2_user_privileges (31), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (2)
Users: 2
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
    );
Scheduled tasks for perch_events: update_category_counts (60 mins)
Editor plug-ins: redactor
H1: 188739bf0c829ef56a58af0aabd4349a
L1: c23fdbafafd8f27d5fd23f8e73a94604
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #ffffff
content_singlePageEdit: 0
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 0
lang: en-gb
update_2.8.29: done
latest_version: 2.8.15
on_sale_version: 2.8.29
headerScheme: light
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 1
perch_events_detail_url: /events/event.php?s={eventSlug}
perch_members_login_page: /members/login.php?r={returnURL}
perch_events_update: 1.8
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
(Removed from post)
PERCH_DB_PREFIX: perch2_
PERCH_TZ: America/Chicago
PERCH_EMAIL_FROM: 
PERCH_EMAIL_FROM_NAME: 
PERCH_LOGINPATH: /perch

HOSTING SETTINGS

PHP: 5.6.6
Zend: 2.6.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $
MySQL server: 5.5.44-0ubuntu0.12.04.1-log
Free disk space: 10.29 TB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, json, mbstring, mcrypt, standard, mysql, mysqlnd, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, Reflection, imap, SimpleXML, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 20M
PHP max form post size: 20M
PHP memory limit: 64M
Total max uploadable file size: 20M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
Rachel Andrew

Rachel Andrew 394 points
Perch Support

The message in debug says "Form not posted or did not validate". Usually this is because of a required field.

Can we see the form template?

<perch:form id="form_contact" method="post" app="perch_forms" role="form">
    <perch:error for="all" type="general">
        <div class="error-message">
            <perch:content id="error" type="textarea" label="General Error Message" html="true" editor="redactor" />
        </div>
    </perch:error>
    <div class="input-<perch:error for="name" type="required"> error</perch:error>">
        <perch:label for="name">Name</perch:label>
        <perch:input type="text" id="name" required="true" label="Name" />
        <perch:error for="name" type="required"><p class="error-message">Please add your name</p></perch:error>
    </div>
    <div class="input-<perch:error for="email" type="required"> error</perch:error>">
        <perch:label for="email">Email</perch:label>
        <perch:input type="email" id="email" required="true" label="Email" placeholder="you@company.com" />
        <perch:error for="email" type="required"><p class="error-message">Please add your email address</p></perch:error>
        <perch:error for="email" type="format"><p class="error-message">Please check your email address</p></perch:error>
    </div>
    <div class="input-<perch:error for="message" type="required"> error</perch:error>">
        <perch:label for="message">Message</perch:label>
        <perch:input type="textarea" id="message" required="true" label="Message" editor="redactor" html="true" />
        <perch:error for="message" type="required"><span class="error-message">Please add a message</span></perch:error>
    </div>
    <div>
        <perch:input type="submit" id="submit" value="Send" />
    </div>
    <perch:success>
        <div class="success-message">
            <perch:content id="success" type="textarea" label="Thank you message" html="true" editor="redactor" />        
        </div>
    </perch:success>
</perch:form>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show us the debug output on the page after the form is submitted?

Do you get the success message?

At one point in the midst of all refactoring attempts I did get the success message. But now the form does not appear on the page to fill out and submit.

It does show up in the admin to edit the messages.

<div class="half column">
        <div id="events" class="events">
            <div class="column-header">Calendar of Events</div>
            <div class="box calendar-events">
                <?php perch_events_listing(); ?>
            </div>
        </div>
</div>
<div class="form-contact">
       <?php perch_content('Contact UCCTA'); ?>
</div>
Drew McLellan

Drew McLellan 2638 points
Perch Support

So the current state of this is that you cannot display a form on the page?

Yes, No Form or Events. Both of these are one the same page. When I removed the function for events, the form showed up. But the submitted form does not show up in the admin panel.

Apps > Forms debug


Debug Message [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='e4db25b2f552b77f9fa3b6d50bf082b4' LIMIT 1 UPDATE perch2_users SET userHash='ec2a83a42a207859be49fb452dbc885e' WHERE userID='1' [31] SELECT p.privKey FROM perch2_user_privileges p [18] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID [nil] SELECT * FROM perch2_forms Attempting app installation: perch_forms [1] SHOW TABLES LIKE "perch2_forms" Queries: 7 Memory: 2.0008

This is my development server

Pages > Home > Regions > Contact UCCTA

Debug Message
[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='233649927a68f4b67dc6e414769b8051' LIMIT 1
UPDATE perch2_users SET userHash='304c641673e809c4701fae7832cf8985' WHERE userID='1'
[31] SELECT p.privKey FROM perch2_user_privileges p
[18] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[1] SELECT * FROM perch2_content_regions WHERE regionID=10 LIMIT 1
[1] SELECT * FROM perch2_pages WHERE pageID='1' LIMIT 1
[1] SELECT * FROM perch2_content_items WHERE regionID=10 AND itemRev=1 ORDER BY itemOrder ASC
[1] SELECT * FROM perch2_content_items WHERE regionID=10 AND itemRev=1 ORDER BY itemOrder ASC
Using template: /templates/content/contactus.html
Form not posted or did not validate
Queries: 9
Memory: 3.6641
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show me the debug from the actual page? Control panel debug isn't useful in this case.

I have global header and footer layouts on this page

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you able to show me the debug output from the page itself?