On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hiall,

    I implemented a first multilanguage website with babel, and it worked pretty well. Thanks to the babel-creator and all who contributed!

    So I went on to implement a second multilanguage website with babel for which I enabled SEO friendly URLs according to http://www.multilingual-modx.com/blog/2011/seo-friendly-multilingual-websites-with-modx-and-babel.html
    where the installation includes the definition of different contexts for different languages.

    On this website I also installed FormIt, which I used in other projects as well. However I could not successfully submit forms; of course I could push the button but an empty page did return; no email was sent nor errors loged; form could not redirect or display a message message.

    I tried turning off almost everything in the form like redirect, captcha, validation, reduction of number of fields, implementing the sample form from rtfm.modx.com without any luck. I installed BobRays QuickEmail and it worked, so it seems not to be an infrastructure problem.

    So I started over again, fresh MODX 2.2.0-pl install, only one single Add-On FormIt, and that worked well. So it's not a MODX issue.

    Again to better understand the possible cause I started over with a fresh MODX install, installed FormIt and Babel in two steps, while I stil could send forms. Then in order to have Babel work I enabled SEO friendly URLs and exactly then the form no longer worked. I could turn SEO friendly URLs off (always of course in backend and .htaccess) and the form worked again.

    I tried to debug a little bit, and I made a strange observation: in one of the FormIt classes there is a hasSubmission method which did return false even when submitting a form (with Babel installed and SEO friendly URLs enabled) and additionally at that code location I could not inspect the $_POST parameters, they seemed, not surprisingly after the hasSubmission method's return value, to be empty.

    I also tried BobRays SPForms in this install. Unfortunately these don't work either. Repeated the test with QuickEmail, it sends emails.

    I have no idea if I observed a problem in Babel or if I just forgot some configuration step. That's why I would be very glad for any hint or help. Thank you.

    Happy easter and best regards
    • Can you post your formit snippet call and the form code?
      • sorry, sure, the following is the formit snippet call and form code:

        &validationErrorMessage=`Please fill in name field.`
           &validate=`fname:required:stripTags` ]]
        <form action="[[~[[*id]]]]" method="post" class="form">
         <input type="hidden" name="nospam:blank" value="" />
            <label for="fname">
                <span class="error">[[!+fi.error.fname]]</span>
            <input type="text" name="fname" id="fname" size="35" value="[[!+fi.fname]]" />
            <input type="submit" value="Register me!" />

        the above doesn't work, but I tried again with renaming .htaccess to ht.access and turning off SEO friendly URLs, then the above works
        • hmm..very strange. can you put a snippet before the FormIt call and check if you have the POST variables?

          If you have no modx errors logged, can you check the error log of your server?
          • - print_r displays an empty array in a snippet;
            - also added this to index.php because to my understanding nothing may have happend,
            - replacing [[~[[*id]]]] with the page's alias /registration.html didn't change anything,
            - MODX and server error log are both empty,
            - I start thinking that maybe the error is in my .htaccess file (excerpt from it:)
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
            • Hi almo

              I have the same problem, did you solve it ?

              • Hi JuTs
                Unfortunately I didn't solve that problem yet.
                Wish you good luck.
                • And have you used an other solution for the forms ?
                  • Hi,

                    That works now. I don't know how, I just tried to reinstall Formit and all seems to be OK.