Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter robbgraves

    (@robbgraves)

    Finally got it to work. Found the old solution at: https://www.ads-software.com/support/topic/plugin-contact-form-7-contact-form-7-iis-404-handlerphp

    still works.

    replaced

    $url = wpcf7_get_request_uri();

    with

    $url = ‘/index.php/’.parse_url($_SERVER[‘REQUEST_URI’]);

    in the Contact 7 classes.php file

    Thread Starter robbgraves

    (@robbgraves)

    Anyone know what I am talking about? I am using a custom 404 so that permalinks will work in IIS6. We had to originally change the older versions of the plugin by editing the classes.php file in the includes folder with this code:

    /* Generating Form HTML */
    
    	function form_html() {
    		$form = '<div class="wpcf7" id="' . $this->unit_tag . '">';
    
    		global $post;
            $url = '/index.php?page_id='.$post->ID;
    
    		if ( $frag = strstr( $url, '#' ) )
    			$url = substr( $url, 0, -strlen( $frag ) );
    
    		$url .= '#' . $this->unit_tag;
    
    		$url = apply_filters( 'wpcf7_form_action_url', $url );
    
    		$class = 'wpcf7-form';
    
    		if ( $this->is_posted() ) {
    			if ( empty( $_POST['_wpcf7_result']['valid'] ) )
    				$class .= ' invalid';
    			elseif ( ! empty( $_POST['_wpcf7_result']['spam'] ) )
    				$class .= ' spam';
    			elseif ( ! empty( $_POST['_wpcf7_result']['mail_sent'] ) )
    				$class .= ' sent';
    			else
    				$class .= ' failed';
    		}

    but in the newer versions of the plugin, this code isn’t relevant. any ideas of how i can get the plugin to work?

Viewing 2 replies - 1 through 2 (of 2 total)