Moodle
  1. Moodle
  2. MDL-16804

List of all users shows a fatal error message {Fatal error: Call to undefined method MoodleQuickForm_hidden::MoodleQuickForm_hidden() in F:\Moodle_WebSite\lib\pear\HTML\QuickForm\element.php on line 363}

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.6
    • Component/s: Installation
    • Labels:
      None
    • Environment:
      Windows Server 2003, MS-IIS v6.0, MySQL Server 5.0, PHP 5.3, PECL 5.2
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      24353

      Description

      From the Admin account I was able to create 4 user accounts. But the when I select List all users the following fatal error shows (Note: I have enabled Minimal debugging):-
      ------------------------------------------------------------------------------------
      Fatal error: Call to undefined method MoodleQuickForm_hidden::MoodleQuickForm_hidden() in F:\Moodle_WebSite\lib\pear\HTML\QuickForm\element.php on line 363
      ------------------------------------------------------------------------------------

      Any suggestions are welcome.

      Regards,

      Hammad Rauf

      1. Clip1.bmp
        2.19 MB
        Hammad Rauf

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          works fine for me, but I did not test it in PHP 5.3alpha - could you please try PHP 5.2.6?

          Show
          Petr Škoda added a comment - works fine for me, but I did not test it in PHP 5.3alpha - could you please try PHP 5.2.6?
          Hide
          Phil Driscoll added a comment -

          I'm experiencing the same issue here on Ubuntu 8.04 with PHP 5.3.0RC4

          Show
          Phil Driscoll added a comment - I'm experiencing the same issue here on Ubuntu 8.04 with PHP 5.3.0RC4
          Hide
          Phil Driscoll added a comment -

          I observe the same error when I'm logged into Moodle, and click on the 'Edit profile' link.

          Show
          Phil Driscoll added a comment - I observe the same error when I'm logged into Moodle, and click on the 'Edit profile' link.
          Hide
          Phil Driscoll added a comment -

          I can confirm that the problem does not exist when using php 5.2.9

          Show
          Phil Driscoll added a comment - I can confirm that the problem does not exist when using php 5.2.9
          Hide
          Petr Škoda added a comment -

          yes, this was problem was already fixed last week, please update to next weekly build or downgrade your PHP to 5.2.x

          Show
          Petr Škoda added a comment - yes, this was problem was already fixed last week, please update to next weekly build or downgrade your PHP to 5.2.x
          Hide
          John Lukar added a comment -

          Hi,
          I am in a bit of a picke here. I am on shared hosting and they are on PHP Version 5.3.2 and can not downgrade to 5.2.x.

          I have a custom moodle (1.9.1) that is highly customized for my client and not able to upgrade to fixed moodle version as many core files have been modified.

          This problem occurs for me.

          Can you tell me what the fix is or patch fix so I can continue to run "Browse List of users" function ?

          All other functions seem to work fine.

          Help please.

          Show
          John Lukar added a comment - Hi, I am in a bit of a picke here. I am on shared hosting and they are on PHP Version 5.3.2 and can not downgrade to 5.2.x. I have a custom moodle (1.9.1) that is highly customized for my client and not able to upgrade to fixed moodle version as many core files have been modified. This problem occurs for me. Can you tell me what the fix is or patch fix so I can continue to run "Browse List of users" function ? All other functions seem to work fine. Help please.
          Hide
          Petr Škoda added a comment -

          Hi John, the fix was to use standard PHP __construct for constructors in all quickforms classes. You can try to diff directories, but without CVS or Git I doubt you can maintain any "highly customised" installation. I hope you have backported all those security fixed we have fixed since the 1.9.1...

          Petr Skoda

          Show
          Petr Škoda added a comment - Hi John, the fix was to use standard PHP __construct for constructors in all quickforms classes. You can try to diff directories, but without CVS or Git I doubt you can maintain any "highly customised" installation. I hope you have backported all those security fixed we have fixed since the 1.9.1... Petr Skoda
          Hide
          Christian Deligant added a comment -

          Hi Petr, I downloaded a fresh MOODLE_19_STABLE ($release = '1.9.9+ (Build: 20101004)') and diffed through the files... but found no evidences of this kind of changes (the __construct bit) I have the same issue on about every single page that makes use of hidden fields... (using a 1.9.5 moodle installation with some integrations)

          Any clues?

          Show
          Christian Deligant added a comment - Hi Petr, I downloaded a fresh MOODLE_19_STABLE ($release = '1.9.9+ (Build: 20101004)') and diffed through the files... but found no evidences of this kind of changes (the __construct bit) I have the same issue on about every single page that makes use of hidden fields... (using a 1.9.5 moodle installation with some integrations) Any clues?
          Hide
          Andrey added a comment - - edited

          quick fix:

          add in HTML_QuickForm_element (moodle/lib/pear/HTML/QuickForm/element.php)

           
          public function __call($name, $args) {
              $name = str_replace('MoodleQuickForm_', '', $name);
          
              if ($name == 'passwordunmask') {
                  $name = 'password';
              }
          
              return call_user_func_array(array($this, 'HTML_QuickForm_'.$name), $args);
          }
          
          Show
          Andrey added a comment - - edited quick fix: add in HTML_QuickForm_element (moodle/lib/pear/HTML/QuickForm/element.php) public function __call($name, $args) { $name = str_replace('MoodleQuickForm_', '', $name); if ($name == 'passwordunmask') { $name = 'password'; } return call_user_func_array(array($ this , 'HTML_QuickForm_'.$name), $args); }
          Hide
          Prasad added a comment -

          Thanks Andrey for that quick fix. You are a life saver!!

          Show
          Prasad added a comment - Thanks Andrey for that quick fix. You are a life saver!!
          Hide
          Jeff Sherk added a comment -

          Thank you Andrey!

          This saved me a whole lot of work!

          Show
          Jeff Sherk added a comment - Thank you Andrey! This saved me a whole lot of work!
          Hide
          Stuker Ramón added a comment -

          Save me too!...thks!.

          Show
          Stuker Ramón added a comment - Save me too!...thks!.
          Hide
          Nadav Kavalerchik added a comment -

          Life saver!!! (had to install an old Moodle 1.9.5 for testing)

          Show
          Nadav Kavalerchik added a comment - Life saver!!! (had to install an old Moodle 1.9.5 for testing)
          Hide
          Kousar added a comment -

          Thanks — You are a life saver!!

          Show
          Kousar added a comment - Thanks — You are a life saver!!
          Hide
          Diana Siachoque added a comment -

          Thanks!! It works perfectly!! Life saver!

          Show
          Diana Siachoque added a comment - Thanks!! It works perfectly!! Life saver!
          Hide
          Steve Bilton added a comment -

          I'm in the middle of a server migration as I type.....
          User testing before going live highlighted the same error, I couldn't create new users or edit user profiles.

          Your hack works adding the function in to a Moodle 1.8.8 also.
          You saved the day, I don't have to start messing with downgrading PHP versions from 5.3 to 5.2 or setting up nested php.

          Life saver!

          Thanks

          Show
          Steve Bilton added a comment - I'm in the middle of a server migration as I type..... User testing before going live highlighted the same error, I couldn't create new users or edit user profiles. Your hack works adding the function in to a Moodle 1.8.8 also. You saved the day, I don't have to start messing with downgrading PHP versions from 5.3 to 5.2 or setting up nested php. Life saver! Thanks

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: