We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26049
    • 12 Posts
    Issue:
    I’m trying to get SPForm 3.1.3 Beta1 working, but every time I try to submit the form, I get an error stating that mydomain.comcontact cannot be located. Why is it leaving out the slash? It should be going to mydomain.com/contact and I can’t figure out how to correct this issue. I’m sure it’s something simple, but I have yet to find it.

    What I’ve tried:
    I tried adding a leading slash before the ID in the following tag (<form action="/[[~[[*id]]]]" method="post" onsubmit="return checkform(this);">), but it still get’s stripped out. I’ve tried to replace the ID tag with "/contact/", but that didn’t work either.
    I’ve totally un-installed and re-installed SPForm, but didn’t have any greater success.

    Reference:
    I am running MODx Revolution Traditional (2.0.4 pl2) on Linux (Linux infong 2.4 #1 SMP Wed Nov 4 21:12:12 UTC 2009 i686 GNU/Linux ) running PHP 5.2.14 and mySQL 5.0.67. PDO Driver for MySQL, client library version 5.0.67 is installed. I’m not using any opcode caching. I’m designing and viewing the pages in Firefox 3.6.12

    Any assistance would be appreciated.
      • 3749
      • 24,544 Posts
      The form is just forwarding to itself in the standard MODx way, so something outside SPForm is wrong.

      Make sure you have <base href="[[!++site_url]]" /> in all templates.

      If that doesn’t do it, try this diagnostic test:

      Make sure the form action is "[[~[[*id]]]]"
      Turn friendly URLs off
      rename .htaccess to ht.access
      clear the site cache

      See if the form works.
      If it does, it probably means that the FURLs part of .htaccess is misconfigured.
        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
        • 26049
        • 12 Posts
        Bob,

        Thank you for your response. I tried doing the test you suggested and I wasn’t able to get any better results.
        I find when I write [[~[[*id]]]] to the page, I get the following: contact/
        I’m thinking there must be a setting somewhere that is not allowing root relative links. I know I’ve had this issue in the past with links created through TinyMCE. I recently upgraded my revolution version and I’m wondering if it may have overwritten a modification I had made.
        Thank you again for your assistance, Bob.
          • 3749
          • 24,544 Posts
          In the meantime, you can always hard-code the URL in the form action. wink
            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
            • 26049
            • 12 Posts
            Good idea about hard coding the URL, Bob. I tried that, but that didn’t work either. I know now that this doesn’t have anything to do with SPForm, but it is weird because I’m having the same issue with the GoogleSiteMap snippet. It shows the pages as "http://mydomain.comcontact/" instead of "http://mydomain.com/contact/". I’ve checked all of the system settings, but I’m not seeing anything that affects this. I’ve printed out [[~[[*id]]]] to the page and it shows as follows: contact/
            I want a root relative link, but for some reason, I can’t get it. I’m baffled. :’(
              • 3749
              • 24,544 Posts
              See if the container_suffix System Setting is set to /
              That’s the only thing I can think of.

              If that’s not it, you might want to ask in a different area where more people will see the question.
                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