• Resolved nuXbox

    (@nuxbox)


    Hi,

    I get an error notice on my WordPress debug bar.

    The error notice like the following:

    NOTICE: wp-content/plugins/yikes-inc-easy-mailchimp-extender/public/partials/shortcodes/process_form_shortcode.php:256 – Undefined index: merge
    require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/customizr-pro/index.php’), do_action(‘__after_article_container’), call_user_func_array, TC_sidebar->tc_sidebar_display, get_sidebar, locate_template, load_template, require_once(‘/themes/customizr-pro/sidebar-right.php’), dynamic_sidebar, call_user_func_array, WP_Widget->display_callback, Yikes_Inc_Easy_Mailchimp_Extender_Widget->widget, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, process_mailchimp_shortcode

    Thank you for any help.

    https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Evan Herman

    (@eherman24)

    Hi Nuxbox,

    I’m going to take a look into this error. I haven’t come across any notices like that. I will report back here shortly with some of my findings.

    Where is this notice occurring for you? Or is it on every page?

    Thanks,
    Evan

    Thread Starter nuXbox

    (@nuxbox)

    Hi Evan,

    Thank you for your response.

    The notice occurred on every page where the form enabled on Widget/Sidebar area.

    Thread Starter nuXbox

    (@nuxbox)

    Hi Evan,

    The notice disappear when I try comment out line: 256 on /wp-content/plugins/yikes-inc-easy-mailchimp-extender/public/partials/shortcodes/process_form_shortcode.php

    So be as shown below:

    // email must always be required and visible
    	if( $field['type'] == 'email' ) {
    		$field_array['required'] = 'required="required"';
    		$label_array['visible'] = '';
    		$label_array['required'] = 'class="' . $field['merge'] . '-label yikes-mailchimp-field-required"';
    	} else {
    		$field_array['required'] = isset( $field['require'] ) ? 'required="required"' : '';
    		$label_array['visible'] = isset( $field['hide'] ) ? 'style="display:none;"' : '';
    		#$label_array['required'] = isset( $field['require'] ) ? 'class="' . $field['merge'] . '-label yikes-mailchimp-field-required"' : 'class="' . $field['merge'] . '-label"';
    	}

    If you do not mind please let me know what the function of the code that I made to comment out?

    So far, no error appears when I have to change.

    Thanks,
    Al nuXbox

    Plugin Author Evan Herman

    (@eherman24)

    Hi nuXbox,

    To answer your last inquiry, that specific set of code actually applies the required parameter to the input field and the appropriate classes to the parent label.

    To answer your other open thread, that is why the required field no longer works, because you deleted the code that applies the required html tag.

    I will be looking into the debug bar issue today.

    Thanks,
    Evan

    Plugin Author Evan Herman

    (@eherman24)

    Hi Nuxbox,

    You are correct. When an interest group is being displayed there is no merge tag variable being defined, thus the php warning/error.

    I’m not entirely sure when, but I will be pushing out an update to resolve this issue as soon as time permits.

    If you want to implement a temporary fix for the time being, the code that you pasted above can be replaced entirely with the following bit of code:

    // email must always be required and visible
    if( $field['type'] == 'email' ) {
    	$field_array['required'] = 'required="required"';
    	$label_array['visible'] = '';
    	$label_array['required'] = 'class="' . $field['merge'] . '-label yikes-mailchimp-field-required"';
    	} else {
    	if( $tag == 'merge' ) {
    		$field_array['required'] = isset( $field['require'] ) ? 'required="required"' : '';
    		$label_array['visible'] = isset( $field['hide'] ) ? 'style="display:none;"' : '';
    		$label_array['required'] = isset( $field['require'] ) ? 'class="' . $field['merge'] . '-label yikes-mailchimp-field-required"' : 'class="' . $field['merge'] . '-label"';
    	} else {
    		$field_array['required'] = isset( $field['require'] ) ? 'required="required"' : '';
    		$label_array['visible'] = isset( $field['hide'] ) ? 'style="display:none;"' : '';
    		$label_array['required'] = isset( $field['require'] ) ? 'class="' . $field['group_id'] . '-label yikes-mailchimp-field-required"' : 'class="' . $field['group_id'] . '-label"';
    	}
    }

    Let me know if that helps out!

    Thanks,
    Evan

    Thread Starter nuXbox

    (@nuxbox)

    Hi Evan,

    Thank you! now Debug Bar not detecting php warning/error again after put merge tag variable as you provide above.

    Once again thank you! Nice help to resolve.

    Regards,
    Al nuXbox

    P.S.: I wish you willing gave me other suggestions for resolving my other problem in https://wordpress.org/support/topic/field-required-option-on-interest-groups-field-not-work?replies=4#post-7570604

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Getting error notice on WordPress debug bar’ is closed to new replies.