We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26435
    • 1,193 Posts
    ScottyDelicious Reply #301, 19 years ago
    You have some html code in the input handler call. That is naughty tongue.
    j/k, but it has given me trouble too.

    Here is the real deal:
    This is what WLPE is expecting for &inputHandler.
    LABEL:DOM_ID:FIELDNAME:FIELD_TYPE:Option(value),Option2(value2)

    LABEL - Plain text to go into the html label element.
    DOM_ID - plain text that will go into the id="DOM_ID" part of the html tag.
    FIELDNAME - The plain text value that will go into the name="FIELDNAME" part of the tag.
    FIELD_TYPE - again, plain text... "select", "select multiple", "checkbox", or "radio".
    As you might have guessed, at this point, the options and their (values) should also be passed as plain text.

    I will work on getting the LABEL to use a chunk if you want to use HTML, but for now, you gotta take the HTML out of the snippet call or, as they say, "It ain’t gonna work".

    -sD-
    Dr. Scotty Delicious, Scientist 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: Dr. at Sep 13, 2007, 08:10 PM

      You have some html code in the input handler call. That is naughty  tongue.
      j/k, but it has given me trouble too.

      Here is the real deal:
      This is what WLPE is expecting for &inputHandler.
      LABEL:DOM_ID:FIELDNAME:FIELD_TYPE:Option(value),Option2(value2)

      LABEL - Plain text to go into the html label element.
      DOM_ID -  plain text that will go into the id="DOM_ID" part of the html tag.
      FIELDNAME -  The plain text value that will go into the name="FIELDNAME" part of the tag.
      FIELD_TYPE -  again, plain text... "select", "select multiple", "checkbox", or "radio".
      As you might have guessed, at this point, the options and their (values) should also be passed as plain text.

      I will work on getting the LABEL to use a chunk if you want to use HTML, but for now, you gotta take the HTML out of the snippet call or, as they say, "It ain’t gonna work".

      -sD-
      Dr. Scotty Delicious, Scientist DFPA.

      Oh, okay. That’s no problem. It works fine now. smiley

      The only thing I have left is that avatar error. Do you know why it’s wanting to upload it to the root of my website --- is there an option to set the folder location for avatars that I missed? Or do I need to CHMOD 777 the root?
        My Snippets
        -> PopUpChunk v1.0
        • 26435
        • 1,193 Posts
        ScottyDelicious Reply #303, 19 years ago
        Holy shit!
        There is a really good reason it is trying to do that.

        I don’t know how the hell I missed this for soooo long, but here is the code to move the uploaded image out of temp:
        [php]
        $userImage = $modx->config['base_path'].strtolower(str_replace(' ', '-', basename( $_FILES['photo']['name'])));
        if (!move_uploaded_file($_FILES['photo']['tmp_name'], $userImage))
        [/php]

        This is around line 2500 or so in weblogin.class.php

        It SHOULD read:
        [php]
        $userImage = $modx->config['base_path'].'assets/snippets/webloginpe/userimages/'.strtolower(str_replace(' ', '-', basename( $_FILES['photo']['name'])));
        if (!move_uploaded_file($_FILES['photo']['tmp_name'], $userImage))
        [/php]


        You should change that now and the problem SHOULD go away.
        I will apply the fix for the next release.

        -sD-
        Dr. Scotty Delicious, Scientist 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
          Yep, that fixed it. Thanks. smiley
            My Snippets
            -> PopUpChunk v1.0
            • 31837
            • 59 Posts
            Hi Scotty,
            I know this question is for version 2, but I’m not sure if it was fixed though in 3.

            I discovered that when a user deletes their profile, the data from the extended user attributes doesn’t get deleted. It still stays there.

            Was that addressed in the new one? or was it a deliberate action not not have it deleted? undecided
            It doesn’t worry me at all, but I was just curious.

            thanks mate.
            -Steve
              • 26435
              • 1,193 Posts
              ScottyDelicious Reply #306, 19 years ago
              Quote from: vr_driver at Sep 13, 2007, 09:41 PM

              Hi Scotty,
              I know this question is for version 2, but I’m not sure if it was fixed though in 3.

              I discovered that when a user deletes their profile, the data from the extended user attributes doesn’t get deleted. It still stays there.

              Was that addressed in the new one? or was it a deliberate action not not have it deleted? undecided
              It doesn’t worry me at all, but I was just curious.

              thanks mate.
              -Steve
              Oh crap!!!!
              Great catch steve! Thanks.
              No, to answer both your questions, it was not fixed in 1.3.0, and it was not deliberate.
              I will address the issue tonight.

              Seems to be a lot of mistakes being caught, so I am going to wait a couple of days to issue an official point release (1.3.1 I guess?). Until then, here is a list of what has been fixed so far.

              1. Order of execution for Event Invocation (namely OnWebLogin). DONE
              2. Error catching added to Web Access System Event methods (to prevent their invocation in the presence of an error). DONE
              3. &inputHandler will now accept a chunk name OR plain text as a value for the LABEL. DONE
              4. Path correction in CreateUserImage() method. DONE
              5. ADD extended user attributes table AND active_users table to list of user rows to delte in RemoveUser(). TO DO

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


                I send pointless little messages
                • 26435
                • 1,193 Posts
                ScottyDelicious Reply #307, 19 years ago
                BUGS TO SQUASH for 1.3.1 :
                1. Order of execution for Event Invocation (namely OnWebLogin). DONE
                2. Error catching added to Web Access System Event methods (to prevent their invocation in the presence of an error). DONE
                3. &inputHandler will now accept a chunk name OR plain text as a value for the LABEL. DONE
                4. Path correction in CreateUserImage() method. DONE
                5. ADD extended user attributes table AND active_users table to list of user rows to delte in RemoveUser(). DONE

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


                  I send pointless little messages
                  • 7455
                  • 2,204 Posts
                  Maybe there needs to be a plugin that deletes the extra field info when you deside to delete a webuser from the manager.
                    follow me on twitter: @dimmy01
                    • 7455
                    • 2,204 Posts
                    Bug: Date (dob) in standard form is not saved its set to epoch (01-01-1970)
                      follow me on twitter: @dimmy01
                      • 26435
                      • 1,193 Posts
                      ScottyDelicious Reply #310, 19 years ago
                      Quote from: Dimmy at Sep 14, 2007, 04:37 AM

                      Maybe there needs to be a plugin that deletes the extra field info when you deside to delete a webuser from the manager.
                      Good thinking!

                      Quote from: Dimmy at Sep 14, 2007, 05:06 AM

                      Bug: Date (dob) in standard form is not saved its set to epoch (01-01-1970)
                      In registration, profile, or both?

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


                        I send pointless little messages