• Hello, I’m having an issue with Contact Form 7 on Border Theme. When the form is filled and sent, I get the following message on my website:

    Warning: array_keys() expects parameter 1 to be array, string given in /home/willmarques/public_html/wp-content/plugins/jetpack/modules/contact-form/grunion-contact-form.php on line 1508

    The patch that is offered in https://www.ads-software.com/support/topic/problem-with-jetpack-module-with-contact-form?replies=4#post-8445307 hides the error message, but it still makes the extra fields disappear from the e-mail that is sent, and from the confirmation page that is displayed to the user.

    When you call “get_post_meta” to obtain the extra fields, the return is an empty string (which causes the warning to appear), even if there were extra fields.

    The surprising point is that when you wait a couple of minute and refresh the confirmation page, that problem is solved by itself.

    And for the record, I can still view the correct extra fields in the Feedback section of the admin, as soon as it is posted.

    Thanks by advance for your help,

    https://www.ads-software.com/plugins/jetpack/

Viewing 1 replies (of 1 total)
  • Thread Starter piwel

    (@piwel)

    For information, the problem does not take place if I’m connected as an admin on the backend.

    I just add this lines in wp-content/plugins/jetpack/modules/contact-form/grunion-contact-form.php on line 1508 for it to work (but it’s not clean…)

    if(!is_array($extra_fields)) {
       global $wpdb, $blog_id;
       $query = "SELECT post_id, meta_key, meta_value FROM wp_${blog_id}_postmeta WHERE post_id IN ($feedback_id) AND meta_key = '_feedback_extra_fields' ORDER BY meta_id ASC";
       $result = mysql_query( $query, $wpdb->dbh );
       $row = mysql_fetch_object( $result );
       $extra_fields = unserialize($row->meta_value);
     }
Viewing 1 replies (of 1 total)
  • The topic ‘Problem with JetPack module with Contact Form’ is closed to new replies.