WordPress.org

Ready to get started?Download WordPress

Forums

Fast Secure Contact Form
[resolved] Better action url (5 posts)

  1. frizi
    Member
    Posted 1 year ago #

    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/

  2. Mike Challis
    Member
    Plugin Author

    Posted 1 year ago #

    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

  3. frizi
    Member
    Posted 1 year ago #

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

  4. Mike Challis
    Member
    Plugin Author

    Posted 1 year ago #

    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);
  5. Mike Challis
    Member
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic