We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51020
    • 670 Posts
    Hi there

    I have a formit call directly in my template.
    When I add the emailTo parameter the form disappears from my page.
    &emailTo=`[email protected]`
    


    It seems it’s the @ symbol causing the problem.

    The only way I can get it working is by using a placeholder [[+emailFrom]] and than adding a hidden field in the form with the value, but this is a bit habit ond not great to display the email address in the source code.

    But why can’t I just use the email address directly?


    Confused!

    Andy
      • 17301
      • 932 Posts
      mod_security issue with your hosting envrionment most likely.
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 22840
        • 1,572 Posts
        What does it display if you add the formit call to a chunk and call the chunk in the template
          • 51020
          • 670 Posts
          Quote from: paulp at Sep 28, 2018, 01:50 AM
          What does it display if you add the formit call to a chunk and call the chunk in the template

          Hi Paul,

          Yeah I tried adding the formit call to a chunk - but as soon as I add an @ to the emailTop field, the form disappears from the page in the browser.

          This is my call:

          [[!FormIt?
              &hooks=`spam,email,redirect,FormSave`
              &fsFormTopic=`Form topic here`
              &emailTo=`[email protected]`
              &emailFromName=`My Website`
              &emailFrom=`[email protected]`
              &emailTpl=`compEmailTpl`
              &emailSubject=`Some subject`
              &redirectTo=`37`
           ]]
          


          Strangely the emailFrom field is fine. Even though it contains the same format of email address.
          I have tried removing all the hooks, and anything else that isn't necessary, but the only way I can get the form to load is to remove the @ from the EmailTo address!

            • 17301
            • 932 Posts
            Did you try loosening, or temp disabling, mod security to see if that was the issue?
              ■ email: [email protected] | ■ website: https://alienbuild.uk

              The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
              • 51020
              • 670 Posts
              Quote from: lkfranklin at Sep 28, 2018, 06:15 AM
              Did you try loosening, or temp disabling, mod security to see if that was the issue?

              I haven't - I'm not sure how I would go about that.
              I searched system settings, but cannot see anything with there.
                • 17301
                • 932 Posts
                Do you have cPanel access? There should be a modsecurity link inside the security section.
                  ■ email: [email protected] | ■ website: https://alienbuild.uk

                  The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
                  • 51020
                  • 670 Posts
                  Quote from: lkfranklin at Sep 28, 2018, 09:46 AM
                  Do you have cPanel access? There should be a modsecurity link inside the security section.

                  Ah OK - sorry, thought it was a modx thing.

                  cPanel doesn't seems to have anything called ModSecurity in the Security section, but WHM has the following:

                  ModSecurity™ Configuration
                  ModSecurity™ Tools
                  ModSecurity™ Vendors

                  ModSecurity™ Configuration has:

                  Audit Log Level SecAuditEngine
                  This setting controls the behavior of the audit engine.
                  Only log noteworthy transactions. Recommended

                  Connections Engine SecConnEngine
                  This setting controls the behavior of the connections engine.
                  Do not process the rules.

                  Rules Engine SecRuleEngine
                  This setting controls the behavior of the rules engine.
                  Process the rules.

                  Backend Compression SecDisableBackendCompression
                  Disables backend compression while leaving the frontend compression enabled.
                  Enabled - Default


                  ModSecurity™ Tools is empty

                  ModSecurity™ Vendors has OWASP ModSecurity Ruleset V3.0 but then says 'This vendor is not installed'

                  I have no idea what any of this does, but there doesn't seem to be anything which is on the domain level - it's all global by the looks of it?
                    • 46886
                    • 1,154 Posts
                    Run the snippet several times and then contact your hoster to check for a trigger earning in mod_security, I believe its easy for them to check the logs, especially if you give them the time it fired
                      • 51020
                      • 670 Posts
                      Quote from: nuan88 at Sep 28, 2018, 10:45 AM
                      Run the snippet several times and then contact your hoster to check for a trigger earning in mod_security, I believe its easy for them to check the logs, especially if you give them the time it fired

                      Good idea - will see what they say. Thanks for the steer.