Answers.Body: <p>If $param doesn't have an <code>=</code> in it then the list() wouldn't have an offset 1 element. Can you debug $param?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-12T13:55:17.670Z
Answers.Text: Maybe I'm missing something but the debugger in the browser shows up nothing, as though no action has been triggered. Where should I be looking to debug the $param? (I'm not a frequent php coder)
Answers.UserDisplayName: Rose Lanigan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-12T13:59:17.763Z
Answers.Text: The browser wouldn't show much. You could do something like put `CRM_Core_Error::debug_log_message(var_export($param, true));` just after the foreach in the php file, and then look in ConfigAndLog.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-10T14:28:45.673Z
Answers.LastActivityDate: 2020-10-10T16:29:28.110Z
Answers.LastEditDate: 2020-10-10T16:29:28.110Z
Answers.UserDisplayName: Demerit
Body: <p>I have a Form Processor set up to take newsletter signups on a WordPress.com website. The CiviCRM site is hosted separately.</p>
  <p>It was working until recently and I've tried twice to retrace my steps but I've still not got it working.</p>
  <p>When I test the Form Processor on the CiviCRM Site, it works as expected (matches to existing contact if present, adds group, adds Data Policy Acceptance Activity, updates one custom field).</p>
  <p>I've checked the settings for the Contact Form in WordPress.</p>
  <p>When I fill in the form on the WordPress site:</p>
  <ul>
  <li>It just hangs, and nothing is stored in CiviCRM</li>
  <li>The debug file says</li>
  </ul>
  <blockquote>
  <p>[10-Oct-2020 12:59:14 UTC] PHP Notice:  Undefined offset: 1 in /srv/htdocs/wp-content/plugins/contact-form-7-civicrm-integration/contact-form-7-civi.php on line 59</p>
  </blockquote>
  <p>This is lines 57-63 in the file mentioned:</p>
  <pre><code>  foreach($parameters as $param) {
      list($key, $val) = explode(&quot;=&quot;, $param);
      if (!empty($key)) {
        $data[$key] = $val;
      }
    }
  </code></pre>
  <p>Any ideas what I need to change/what I've missed?</p>
  
Tags: <wordpress><form-processor>
Title: Form Processor on WordPress - undefined offset: 1
ThreadText: # Form Processor on WordPress - undefined offset: 1
  
  (Asked by: username_0 on 2020-10-10)
  
  I have a Form Processor set up to take newsletter signups on a WordPress.com website. The CiviCRM site is hosted separately.
  
  It was working until recently and I've tried twice to retrace my steps but I've still not got it working.
  
  When I test the Form Processor on the CiviCRM Site, it works as expected (matches to existing contact if present, adds group, adds Data Policy Acceptance Activity, updates one custom field).
  
  I've checked the settings for the Contact Form in WordPress.
  
  When I fill in the form on the WordPress site:
  
  * It just hangs, and nothing is stored in CiviCRM
  * The debug file says
  
  > [10-Oct-2020 12:59:14 UTC] PHP Notice: Undefined offset: 1 in /srv/htdocs/wp-content/plugins/contact-form-7-civicrm-integration/contact-form-7-civi.php on line 59
  
  This is lines 57-63 in the file mentioned:
  
  ```
    foreach($parameters as $param) {
      list($key, $val) = explode("=", $param);
      if (!empty($key)) {
        $data[$key] = $val;
      }
    }
  
  ```
  
  Any ideas what I need to change/what I've missed?
  
  **Tags:** wordpress, form-processor
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-10-10. Score: 0
  
  If $param doesn't have an `=` in it then the list() wouldn't have an offset 1 element. Can you debug $param?
  
  > **Comments:**
  > **username_0**: Maybe I'm missing something but the debugger in the browser shows up nothing, as though no action has been triggered. Where should I be looking to debug the $param? (I'm not a frequent php coder)  
  > **username_1**: The browser wouldn't show much. You could do something like put `CRM_Core_Error::debug_log_message(var_export($param, true));` just after the foreach in the php file, and then look in ConfigAndLog.  
  
  ---
  
  