We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7136
    • 12 Posts
    Very interesting.
    It worked for exactly ONE button click with a clean install and minimal template selected (no other js).
    So, I went back to my original site and noticed that it worked exactly ONE time after I changed the template (regardless of the template that I changed it to). All subsequent loads of the page ignore the button presses. However...

    Now for the weird part. The only difference from when it works to when it doesn’t work is the inclusion of a second ieButtonFix.js include...?

    <script type="text/javascript" src="assets/snippets/webloginpe/js/ieButtonFix.js"></script>
    <script type="text/javascript" src="assets/snippets/webloginpe/js/ieButtonFix.js"></script>

    I just reset the template so if you are the only one that tries it out, you can see that the first time the page loads, only one call and any ONE button works. The second time the page loads, second js script call, nothing works.

    PM me if you want admin access, this is just a "stunt" site I was using for prototyping functionality for a client.

    -Derrick
      • 26435
      • 1,193 Posts
      One of the users, Soshite, was having the same problem. I had him comment out the line in the snippet (I think it is around 94) where regClientStartupScript loads ieButtonFix.js and then just manually call the script in the head of his template and that fixed the problem.

      I don’t know right now why WebLoginPE is loading it twice, but I have a team in the crime lab, working in shifts to figure this out. Just kidding, but I am looking into it.

      -sD-
      Dr. Scotty Delicious, DFPA.
        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
        All of the above... in no specific order.


        I send pointless little messages
        • 7136
        • 12 Posts
        No problem. That took care of it.

        Let me know how the forensics team does on their late-night work....

        Sounds like a Guinness night!

        -Derrick
        • Quote from: Dr. at Oct 05, 2007, 02:04 AM

          One of the users, Soshite, was having the same problem. I had him comment out the line in the snippet (I think it is around 94) where regClientStartupScript loads ieButtonFix.js and then just manually call the script in the head of his template and that fixed the problem.

          I don’t know right now why WebLoginPE is loading it twice, but I have a team in the crime lab, working in shifts to figure this out. Just kidding, but I am looking into it.
          Scotty, this is actually a known bug with the regClient API’s introduced right before 0.9.6 release -- fixed in trunk for upcoming 0.9.6.1 release. Only work around in 0.9.6 is calling it uncached on an uncached page.
            • 26435
            • 1,193 Posts
            Thanks Jason.
            I was looking over my code thinking... "I don’t know WTF I did wrong and there is a ton of letters and numbers here to look over!"

            -sD-
            Dr. Scotty Delicious, DFPA
              Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
              All of the above... in no specific order.


              I send pointless little messages
              • 28033
              • 925 Posts
              Quote from: OpenGeek at Oct 05, 2007, 04:14 PM

              Scotty, this is actually a known bug with the regClient API’s introduced right before 0.9.6 release -- fixed in trunk for upcoming 0.9.6.1 release. Only work around in 0.9.6 is calling it uncached on an uncached page.

              Darn, looks like I’ll have to wait till then, since I can’t have my entire website running uncached (since it’s included on every page).

              At least Scotty’s fix works for the moment. smiley
                My Snippets
                -> PopUpChunk v1.0
                • 26862
                • 1 Posts
                I ran into the same problem. I found a work around that will allow it to work and still allow caching.

                In the webloginpe snippet code, change the API call:

                $modx->regClientStartupScript( ’assets/snippets/webloginpe/js/ieButtonFix.js’);

                to

                $modx->regClientScript( ’assets/snippets/webloginpe/js/ieButtonFix.js’);

                This will cause it to be added to the bottom of the document body and not be included in the header.

                It doesn’t seem to be included twice and all the functionality seems to work.

                  • 26435
                  • 1,193 Posts
                  Good point shad0bear.
                  Unlike some of the scripts that can be registered with WebLoginPE, the ieButtonFix.js script does not need to be loaded in the head before the document is ready since the code in it is only executed when a button is pressed.

                  Thanks for sharing your success tip. I will probably put it into the next version of WebLoginPE using $modx->regClientScript() since it it technically more appropriate anyway.

                  -sD-
                  Dr. Scotty Delicious, DFPA.
                    Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                    All of the above... in no specific order.


                    I send pointless little messages
                    • 24160
                    • 15 Posts
                    Quote from: shad0bear at Oct 06, 2007, 06:06 PM

                    I ran into the same problem. I found a work around that will allow it to work and still allow caching.

                    In the webloginpe snippet code, change the API call:

                    $modx->regClientStartupScript( ’assets/snippets/webloginpe/js/ieButtonFix.js’);

                    to

                    $modx->regClientScript( ’assets/snippets/webloginpe/js/ieButtonFix.js’);

                    This will cause it to be added to the bottom of the document body and not be included in the header.

                    It doesn’t seem to be included twice and all the functionality seems to work.



                    I had the same problem, I tried your suggestion, it solved the problem for FF, but when you back to IE, the same problem occur (buttons not working). opera is fine.
                    Are there any suggestion to load different code depends on different browser .
                    • Quote from: qm777 at Oct 07, 2007, 05:34 PM

                      I had the same problem, I tried your suggestion, it solved the problem for FF, but when you back to IE, the same problem occur (buttons not working). opera is fine.
                      Are there any suggestion to load different code depends on different browser .
                      Sounds like it does actually need to be in the HEAD then. You could comment these regClient*() calls out of the code and manually add the javascript to your HEAD tag (using a chunk, or maybe a TV with @INHERIT, etc., placed in the appropriate template( s )), get a copy of the latest trunk from SVN which has a solution for this bug in the core MODx code, or just make sure your pages aren’t cached for now.