Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30518

custom checkboxes profile fields in signup form causes invalid $id parameter detection at signup time

    Details

      Description

      Set debug level to DEVELOPER

      Go to Site administration > Users > Accounts > User profile fields

      Add a "checkbox" profile fields to the signup form with the following attributes:
      -> Is this field required? yes
      -> Display on signup page? yes
      -> Who is this field visible to? Visible to everyone

      Log out.

      Go to the signup form as non authenticated user.

      You see:

      context_system::instance(): invalid $id parameter detected, should be 0
       
          line 5532 of /lib/accesslib.php: call to debugging()
          line 6807 of /lib/accesslib.php: call to context_system::instance()
          line 32 of /user/profile/field/checkbox/field.class.php: call to get_context_instance()
          line 72 of /user/profile/lib.php: call to profile_field_checkbox->edit_field_add()
          line 477 of /user/profile/lib.php: call to profile_field_base->edit_field()
          line 103 of /login/signup_form.php: call to profile_signup_fields()
          line 154 of /lib/formslib.php: call to login_signup_form->definition()
          line 46 of /login/signup.php: call to moodleform->moodleform()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for reporting this.

              I've put that on the backlog.

              In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.

              Show
              salvetore Michael de Raadt added a comment - Thanks for reporting this. I've put that on the backlog. In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.
              Hide
              cfulton Charles Fulton added a comment -

              MDL-29602 made the second parameter for get_context_instance redundant when getting CONTEXT_SYSTEM. Looks like a couple instances were overlooked.

              Patch: https://github.com/mackensen/moodle/compare/master...MDL-30518

              Show
              cfulton Charles Fulton added a comment - MDL-29602 made the second parameter for get_context_instance redundant when getting CONTEXT_SYSTEM. Looks like a couple instances were overlooked. Patch: https://github.com/mackensen/moodle/compare/master...MDL-30518
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Thanks Charles, for providing the spot-on patch.
              Pushing it for integration review

              Show
              rajeshtaneja Rajesh Taneja added a comment - Thanks Charles, for providing the spot-on patch. Pushing it for integration review
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks guys this has been integrated now

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks guys this has been integrated now
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Raj can you please add some testing instructions

              Show
              samhemelryk Sam Hemelryk added a comment - Raj can you please add some testing instructions
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks Raj - tested and passed.

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks Raj - tested and passed.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Yes, you did it!

              Now your code is part of the best weeklies released ever, many thanks!

              Closing, ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Yes, you did it! Now your code is part of the best weeklies released ever, many thanks! Closing, ciao

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jan/12