We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40088
    • 708 Posts
    I cleared all the caches etc. It seems to work now in Safari but it still fails in Firefox and Chrome etc.

    Ok, disabling FURL redirects back to the homepage now, though the url still shows the "error" url.
      Todd
      • 40088
      • 708 Posts
      It seems the problem has something to do with the PageLocker add-on. I uninstalled it again and things seem to work as expected.
        Todd
      • That 503 was probably the results of some kind of page loop; servers get cranky if you end up requesting a page that requests the page that requests the page... Some of them are configured to report that condition, others will just throw an error tantrum.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 40088
          • 708 Posts
          It's too bad that PageLocker isn't working for me (outside of MODX), it was a good solution for what I needed. Oh well.
            Todd
          • I know what you mean. The user management system of Access Control Lists, Access Permissions and Access Policies is complex and difficult to grasp. Here's one good tutorial http://bobsguides.com/revolution-permissions.html
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 3749
              • 24,544 Posts
              It could be that PageLocker is throwing an E_NOTICE error. There's a lot of that going on lately with PHP upgrades. I think that will crash a plugin (and MODX).

              In a snippet, you get an error message, but in plugins, it's sayonara.

              Looking at the code, I see a couple of cases where this line:

              $userPW = filter_var($_POST['password'], FILTER_SANITIZE_STRING);


              will throw an E_NOTICE bug when the page is first shown.

              I think it should be:

              $userPW = isset($_POST['password'])? filter_var($_POST['password'], FILTER_SANITIZE_STRING) : '';
              


              I don't see anything else, so fixing those two lines may solve it.



              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              MODX info for everyone: http://bobsguides.com/modx.html [ed. note: BobRay last edited this post 11 years, 9 months ago.]
                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
                • 40088
                • 708 Posts
                Quote from: BobRay at Jul 22, 2012, 06:01 AM
                Looking at the code, I see a couple of cases where this line:

                $userPW = filter_var($_POST['password'], FILTER_SANITIZE_STRING);


                will throw an E_NOTICE bug when the page is first shown.

                I think it should be:

                $userPW = isset($_POST['password'])? filter_var($_POST['password'], FILTER_SANITIZE_STRING) : '';
                


                I don't see anything else, so fixing those two lines may solve it.

                Hmmm ... I wasn't able to get it to work. Thanks for trying.
                  Todd
                  • 3749
                  • 24,544 Posts
                  I haven't tried it, but you might be able to put the plugin code in a snippet and put a snippet tag for it at the top of the Page Content.

                  That might give you an error message that would tell us what's going wrong.


                  ------------------------------------------------------------------------------------------
                  PLEASE, PLEASE specify the version of MODX you are using.
                  MODX info for everyone: http://bobsguides.com/modx.html








                    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
                    • 40088
                    • 708 Posts
                    I ran just the PageLocker code through TextMate and it showed this error:

                    PHP Fatal error: Call to a member function getOption() on a non-object

                    for this line

                    $tvPassword = $modx->getOption('tvPassword',$scriptProperties,'pagePassword');


                    I don't know what it means or if it's relevant.
                      Todd
                      • 3749
                      • 24,544 Posts
                      If you're running it inside of TextMate, the MODX object doesn't exist like it would in a MODX snippet.

                      You could put it in a snippet, or add this code at the top:

                      <?php
                      /* @var $modx modX */
                      if (!defined(MODX_CORE_PATH)) {
                          $outsideModx = true;
                          require_once 'path/to/modx/root/model/modx/modx.class.php';
                          $modx= new modX();
                          $modx->initialize('mgr');
                          echo '<pre>'; /* used for nice formatting for log messages  */
                          $modx->setLogLevel(modX::LOG_LEVEL_INFO);
                          $modx->setLogTarget('ECHO');
                      } else {
                          $outsideModx = false;
                      }



                      ------------------------------------------------------------------------------------------
                      PLEASE, PLEASE specify the version of MODX you are using.
                      MODX info for everyone: http://bobsguides.com/modx.html
                        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