We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37548
    • 6 Posts
    I have a question,

    I have i multilingual website in dutch, german and english.
    When I go to a page with a form in it the page will shown.

    Request URL:http://web.naris.eu/de/support.html
    Request Method:GET
    Status Code:200 OK

    when i post the form and I have the action of the form [[~[[*id]]]] or the whole url
    the page will redirect to another page, this is not the right redirect page in the formit configuration

    Request URL:http://web.naris.eu/de/support.html
    Request Method:POST
    Status Code:302 Moved Temporarily

    Request URL:http://web.naris.nl/bedankt-proberen.html
    Request Method:GET
    Status Code:200 OK

    what can be the problem.

    greetings Thomas
      veni vidi vici
      • 37548
      • 6 Posts
      After doing some research I have found a context key error.

      In several forum posts and even a tracker post I found the problem it's the rewrite of the formit function with more context keys
      see tracker http://tracker.modx.com/issues/4564

      only for me it's not the solution. if put some die's in the application I will find the context key back to web in the file fihookes.class.php (/core/components/formit/model/formit/fihooks.class.php on line 210.

      before the redirect the context key is still "DE" if I die in the gateway function I have made.
        veni vidi vici
        • 37548
        • 6 Posts
        I have found a hack to fix this but I am not happy with it.

        in the file fihookes.class.php (/core/components/formit/model/formit/fihooks.class.php on line 306

        the context key will get the context key of the file. but the contect key of the file is different then the context key set in the gateway file.

        if I comment the $contextKey = $resource->get('context_key'); the right contect key will be set by the $this->modx->context->get('key');

        If have made also a issue on the formit project http://bugs.modx.com/issues/10000

        greetings Thomas
          veni vidi vici