WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Better action url

[Resolved] Better action url

  • In case of multilingual pages, the /de/ /en/ language url is used. The SI contact form is using the Request_uri as action url which is ignoring the actual language setting. Therefor I would suggest to change the from requst to redirect server global variable on
    line 914 of plugins\si-contact-form\si-contact-form.php to:

    if ( is_ssl() ) {
        $form_action_url = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REDIRECT_URL'];
    } else {
    	print_r($_SERVER);
        $form_action_url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REDIRECT_URL'];
    }

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mike Challis

    @mikechallis

    That fix will break on some servers.

    See related discussion
    http://wordpress.org/support/topic/plugin-fast-secure-contact-form-doesnt-work-with-qtranslate

    I am open to better ideas

    Well, kind of
    if(function_exists(qtrans_convertURL)){
    $form_action_url = qtrans_convertURL($_SERVER[‘REQUEST_URI’]);
    }

    Plugin Author Mike Challis

    @mikechallis

    frizi

    Will you test this?
    I can put in next version, but test if you can and let me know

    if(function_exists(qtrans_convertURL))
          // compatible with qtranslate plugin
          // In case of multi-lingual pages, the /de/ /en/ language url is used.
          $form_action_url = qtrans_convertURL($_SERVER['REQUEST_URI']);
    else
          $form_action_url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    
    // set the type of request (SSL or not)
    if ( is_ssl() )
          $form_action_url = preg_replace('|http://|', 'https://', $form_action_url);
    Plugin Author Mike Challis

    @mikechallis

    Tested, confirmed, and fixed. Upgrade to 3.1.5.9 or higher

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Better action url’ is closed to new replies.