Forum
Undefined Index
Hi,
I am seeing the following error:
[26-Jan-2016 10:01:59 UTC] PHP Notice: Undefined index: confirm in /Volumes/Data/g Websites/New Development/Newgate/Clocks Build 4 - gamma/admin/addons/apps/perch_mailchimp/PerchMailchimp_Subscribers.class.php on line 46
My template is:
<div class="customer-create">
<perch:form id="register" method="post" app="perch_mailchimp perch_members" type="default" double-optin="false" send-welcome="false">
<h2>Please fill in your details</h2>
<div>
<perch:label for="first_name" class="required">First name</perch:label>
<perch:input type="text" id="first_name" required="true" label="First name" mailer="FNAME" />
</div>
<div>
<perch:label for="last_name" class="required">Last name</perch:label>
<perch:input type="text" id="last_name" required="true" label="Last name" mailer="LNAME" />
<perch:error for="last_name" type="required">Please add your name</perch:error>
</div>
<div>
<perch:label for="email" class="required">Email</perch:label>
<perch:input type="email" id="email" required="true" placeholder="you@email.com" helper="PerchMembers_Members::check_email" mailer="email" />
<perch:error for="email" type="required">Please add your email address</perch:error>
<perch:error for="email" type="helper">That email address is already in use</perch:error>
<perch:input type="hidden" id="password" value="__auto__" />
</div>
<div>
<perch:label for="phone">Mobile Phone Number </perch:label><span>(We will use this to keep in touch with you about your order)</span>
<perch:input type="text" id="phone" label="phone"/>
</div>
<h3>Delivery Address</h3>
<div>
<perch:label for="address_1" class="required">Address 1</perch:label>
<perch:input type="text" id="address_1" required="true" label="Address 1" />
<perch:error for="address_1" type="required">Please add the first line of your address</perch:error>
</div>
<div>
<perch:label for="address_2">Address 2</perch:label>
<perch:input type="text" id="address_2" label="Address 2" />
</div>
<div>
<perch:label for="city">City</perch:label>
<perch:input type="text" id="city" label="City" />
</div>
<div>
<perch:label for="county">County</perch:label>
<perch:input type="text" id="county" label="County" />
</div>
<div>
<perch:label for="postcode" class="required">Postal code</perch:label>
<perch:input type="text" id="postcode" required="true" label="Postal code" />
<perch:error for="postcode" type="required">Please add your postcode</perch:error>
</div>
<perch:input type="hidden" value="236" id="country" />
<div class="mailinglist">
<div class="container">
<div class="checkbox">
<perch:input type="checkbox" value="1" id="confirm" mailer="confirm_subscribe" />
</div>
<div class="label">
<perch:label for="confirm">Tick here to join the Newgate grapevine and be the first to hear about news, offers and sales</perch:label>
</div>
</div>
</div>
<div>
<perch:input type="submit" value="Proceed to Secure Payment Page" />
</div>
</perch:form>
</div>
The error appears on form submission if the box is not ticked - if it is ticked then no error. It still submits, but I am having some issues with order confirmation down the line so wanted to fix this obvious issue first. Debug is here:
Perch Runway: 2.8.24, PHP: 5.6.7, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.24), assets (2.8.24), categories (2.8.24), perch_forms (1.8.3), perch_mailchimp (2.0.1), perch_shop_orders (1.0), perch_shop_products (1.0), perch_shop (1.0g11), perch_members (1.4.3)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_members', 'perch_shop', 'perch_mailchimp' );
PERCH_LOGINPATH: /admin
PERCH_PATH: /Volumes/Data/g Websites/New Development/Newgate/Clocks Build 4 - gamma/admin
PERCH_CORE: /Volumes/Data/g Websites/New Development/Newgate/Clocks Build 4 - gamma/admin/core
PERCH_RESFILEPATH: /Volumes/Data/g Websites/New Development/Newgate/Clocks Build 4 - gamma/admin/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: dc1fef2ad0fcd9f943c02ebb43d85dbc
Resource folder writeable: Yes
HTTP_HOST: localhost:8888
DOCUMENT_ROOT: /Volumes/Data/g Websites/New Development/Newgate/Clocks Build 4 - gamma
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
I can see what that would occur, but I won't have a fix until we get a chance to revisit the MailChimp app.
No worries thanks Drew - I will leave it for now