We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12556
    • 103 Posts
    When I try to log in as a web user while logged in to the manager I get a message saying that the security code didn’t validate even though there is no security code for that interface. I can try again and it works the second time but only because the failed attempt logged me out of the manager. This has the unfortunate effect of preventing me from accessing secure pages when the site is offline, e.g. when I’m working on it getting it ready for launch. The failed first attempt that logs me out of the manager means I can no longer access the site at all and it goes to the site unavailable page. I have to bring the site online, log in as a web user and then log back into the manager and take the site back offline. Is this a known bug and can it easily fixed or will it be taken care of in a later version of MODx? Thanks!
    Dave
      • 5340
      • 1,624 Posts
      make sure the page is not cached.

      If it does not work post more info
        • 3749
        • 24,544 Posts
        Quote from: iamdave at Dec 18, 2008, 01:20 PM

        When I try to log in as a web user while logged in to the manager I get a message saying that the security code didn’t validate even though there is no security code for that interface. I can try again and it works the second time but only because the failed attempt logged me out of the manager. This has the unfortunate effect of preventing me from accessing secure pages when the site is offline, e.g. when I’m working on it getting it ready for launch. The failed first attempt that logs me out of the manager means I can no longer access the site at all and it goes to the site unavailable page. I have to bring the site online, log in as a web user and then log back into the manager and take the site back offline. Is this a known bug and can it easily fixed or will it be taken care of in a later version of MODx? Thanks!
        Dave

        You don’t say what your using for the login (WebLogin, WebLogin PE?), but do you have Captcha turned on somewhere? It sounds like the login code assumes that you’ve entered a Captcha code and is rejecting you because what it has (nothing) doesn’t match the captcha image it failed to show you.

        This is just a guess, but maybe your login template is missing the part that would show you the captcha image and input field. If that’s not it, turning Captcha off would very likely fix things.

          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
          • 12556
          • 103 Posts
          I’m using WebLogin.  I agree, it seems to be looking for a captcha code but it only does that when I’m logged in to the manager, which is using captcha.  After the first attempt I get logged out of the manager somehow and then it works.

          Oh, and the page is not cached.
            • 3749
            • 24,544 Posts
            I did some digging and found that it was a known problem with WebLogin. It’s fixed in later versions (supposedly) so you might upgrade your version.

            Otherwise, the problem seems to be in this code in weblogin.inc.php.

            if ($useCaptcha){ 
            <tr>
            <td valign="top">Form code:*</td>
            <td>
            <input type="text" name="formcode" class="inputBox" style="width:150px" size="20">
            <a href="[+action+]"><img align="top" src="manager/includes/veriword.php?rand=<?php echo rand(); ?>" width="148" height="60" alt="If you have trouble reading the code, click on the code itself to generate a new random code." style="border: 1px solid #003399"></a>
            </td>
            </tr>


            $useCaptcha is undefined here so you get no captcha image.

            You could try adding a parameter to the weblogin call:  &useCaptcha=`1`

            If that doesn’t work, you could hack the code and put this near the beginning of the assets/snippets/weblogin/weblogin.inc.php file:

            $useCaptcha = true;
              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
              • 12556
              • 103 Posts
              I see. Thanks! I’ll take care of that now.