WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Cant Add New Forms? Get an error everytime (3 posts)

  1. cangri787
    Member
    Posted 1 year ago #

    Hello,

    I am getting a new error message when I try and add a new form through Contact Form 7.

    Says: "Enhanced Custom Fields configuration error: Cannot load -- unknown POST ID"

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    I have no idea. Please ask Enhanced Custom Fields developer instead.

  3. kingstretch
    Member
    Posted 12 months ago #

    It's probably a little late for this, but I just had to figure this out too so I'm posting here so I don't have to figure it out again!

    Chances are, you've got a theme that's including "Enhanced Custom Fields" functionality. You'll need to find where that code is and slightly modify it (mine was in "_framework/custom_fields/fields.php". The code you're looking for looks like this:

    function load() {
    		if (empty($this->post_id)) {
    			ecf_conf_error("Cannot load -- unknow POST ID");
    		}
    		$single = true;
    		if ($this->is_multiply) {
    			$single = false;
    		}
    		$value = get_post_meta($this->post_id, $this->name, $single);
    	    $this->set_value($value);
    	}

    I just commented out the error message and added a return statement to stop execution of the function, like this:

    function load() {
    		if (empty($this->post_id)) {
    			//ecf_conf_error("Cannot load -- unknow POST ID");
    			return;
    		}
    		$single = true;
    		if ($this->is_multiply) {
    			$single = false;
    		}
    		$value = get_post_meta($this->post_id, $this->name, $single);
    	    $this->set_value($value);
    	}

    This allowed me to use the Contact Form 7 plugin properly.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic