General help

Problems Editing User Accounts

Picture of Jutta Duncan
Problems Editing User Accounts


I'm running two Moodle sites on the same GoDaddy dedicated server; both sites use the Essential theme and are running on PHP version 7. The difference is their Moodle version. The problematic site uses Moodle 2.9.1 ( the non-problematic site uses Moodle 2.8.5+).

The error message I get is:
“Exception - Call to a member function getAttribute() on null”

  • Operating system: Max OS Sierra 10.12.6
  • Web server: GoDaddy dedicated server
  • Database: MySQL
  • Versions of everything: MySQL 5.6.37, PHP 7


1. Tried to edit a user profile (email address and password) via Site Administration > Users > Accounts > Browse List of Users
2. When I clicked on the gear icon to edit the profile, I got an “Exception - Call to a member function getAttribute() on null” error
3. I switched to PHP 5.6 for troubleshooting and tried editing the same profile again
4. A few times, I got the following error: “Timed out while waiting for session lock. Wait for your current requests to finish and try again later.”
5. Once I got this error:  “Gateway Timeout. The gateway did not receive a timely response from the upstream server or application. Additionally, a 504 Gateway Timeout error was encountered while trying to use an ErrorDocument to handle the request.”
6. A few other times editing the profile actually worked fine and I got no errors at all; the most recent times I've tried it, I got no errors on PHP 5.6, but I continue to receive the “Exception - Call to a member function getAttribute() on null” error when running the site on PHP 7

I turned on Debugging with the site on PHP 7 and tried to edit a user profile again. These are the debug messages I got:

  • Exception - Call to a member function getAttribute() on null

Debug info: 
Error code: generalexceptionmessage

Stack trace:

  • line 105 of /lib/form/textarea.php: Error thrown
  • line 572 of /lib/pear/HTML/QuickForm.php: call to MoodleQuickForm_textarea->onQuickFormEvent()
  • line 538 of /lib/pear/HTML/QuickForm.php: call to HTML_QuickForm::_loadElement()
  • line 170 of /lib/form/tags.php: call to HTML_QuickForm::createElement()
  • line 537 of /lib/pear/HTML/QuickForm/group.php: call to MoodleQuickForm_tags->_createElements()
  • line 268 of /lib/pear/HTML/QuickForm/group.php: call to HTML_QuickForm_group->_createElementsIfNotExist()
  • line 80 of /lib/form/group.php: call to HTML_QuickForm_group->getGroupType()
  • line 2740 of /lib/formslib.php: call to MoodleQuickForm_group->getElementTemplateType()
  • line 260 of /lib/form/tags.php: call to MoodleQuickForm_Renderer->renderElement()
  • line 1632 of /lib/pear/HTML/QuickForm.php: call to MoodleQuickForm_tags->accept()
  • line 1696 of /lib/formslib.php: call to HTML_QuickForm->accept()
  • line 1675 of /lib/pear/HTML/QuickForm.php: call to MoodleQuickForm->accept()
  • line 435 of /lib/pear/HTML/Common.php: call to HTML_QuickForm->toHtml()
  • line 204 of /lib/pear/HTML/QuickForm/DHTMLRulesTableless.php: call to HTML_Common->display()
  • line 923 of /lib/formslib.php: call to HTML_QuickForm_DHTMLRulesTableless->display()
  • line 357 of /user/editadvanced.php: call to moodleform->display()

I appreciate any help that anyone can offer here! Please let me know if there's additional information I can provide or other troubleshooting steps I can take. 

Thank you!


Average of ratings: -