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

Answered SPForm on Cloud

    • 36632
    • 202 Posts
    Even though I have the domain, www.domain, and cloud domains set as Allowed Referrers, SPForm displays the Unallowed Referrer error.

    What should I do in order to troubleshoot this usually reliable Snippet?

    This question has been answered by ultrasef. See the first response.

      • 3749
      • 24,544 Posts
      I would try creating a snippet with this code:

      <?php
      return $_SERVER['HTTP_REFERER'];
      

      and putting a tag for it on a page. That should give you the actual referer, which you can put in the SPForm property.

      BTW, if you navigate to the email form by typing in the URL rather than clicking on a link to it, that value will be empty.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36632
        • 202 Posts
        EDITED:I see what you're saying now. The referrer I got this time was the referrer in the Property. I removed the Cloud URLs. It seems to work now.
        ---------------------------------------------
        I created a Snippet and placed it on a page and Viewed it.

        I got: http://domainname.com/manager/index.php?a=30&id=19

        Not what I was expecting, LOL! I logged out and copied the URL to a different browser and got a blank.
        [ed. note: ultrasef last edited this post 11 years, 3 months ago.]
          • 3749
          • 24,544 Posts
          Sorry, I forgot to mention that SPForm parses out the domain.com part, so that's what you want in the property.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 36632
            • 202 Posts
            It works, then it doesn't work. Cache cleared: then it works. Can't clear cache from the Mgr Clear Cache function, so I did it manually. So far it appears to be working. I dislike that I have to remember to test it every other hour.
              • 36632
              • 202 Posts
              And just now it blanked on me. It went to the contact (not response) url and blanked.

              What re the alternative contact forms for SPForm? I need a form because not everyone wants to use their email app.
                • 3749
                • 24,544 Posts
                Try adding &warnAll=`1` in the SPForm snippet tag. That should give you a message rather than a blank screen. The intermittent white screen usually means that some spam-proofing property needs to be changed.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 36632
                  • 202 Posts
                  It's still sporadic. WHen I tried it after that "warnAll" is worked, but that might've been because of the Cloud cache.

                  I tried it just now with my usual speed and got this message upon Submit:
                  You took too much or too little time filling the form.

                  Ouch! SO which was it! ;-)
                    • 3749
                    • 24,544 Posts
                    If you were testing, probably too little. Usually, only bots will fill a form that fast.

                    Try this in the snippet tag:
                    &useTimer=`0`


                    I think there's a property to adjust the times, but I can't remember offhand what it is. If you don't want to turn the timer off, let me know and I'll check.
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 36632
                      • 202 Posts
                      Getting a little bit weirder: browsing through the Package Manager just now it showed that SPForm was downloadable. So I downloaded it, knowing full well that I already had it downloaded.

                      Makes me think: Vaporized sites have issues.

                      UPDATE: I refreshed the Elements Tree, then opened the SPForm snippet. The default properties I had edited were toast. This tells me that Vaporized sites might have property set issues, even the default ones. Is it a file/permissions issue? Or database issue? I'd place my bets on it being a file ... no, a data... oh heck. [ed. note: ultrasef last edited this post 11 years, 3 months ago.]