|
|
|
If you try to add an 'htmleditor' form element, using 'createElement' (for use in a group, for example), it generates the error:
"Fatal error: Call to undefined method [caller object]::getAttribute() in [moodleroot]/lib/form/textarea.php on line 73"
'addElement' does work.
It appears that there is a specific trap for 'createElement' event in the '/lib/form/textarea.php' that is trying to use the getAttribute method on the caller object. This object may not have this method, and its likely its assuming a different caller anyway (probably from addElement?).
I used a workaround to use getAttribute only if the caller variable is an object and has that method, but I don't think that's the correct solution. Not sure what should be done.
This workaround will not let me use setHelpButton on the 'htmleditor' though.
|
|
Description
|
If you try to add an 'htmleditor' form element, using 'createElement' (for use in a group, for example), it generates the error:
"Fatal error: Call to undefined method [caller object]::getAttribute() in [moodleroot]/lib/form/textarea.php on line 73"
'addElement' does work.
It appears that there is a specific trap for 'createElement' event in the '/lib/form/textarea.php' that is trying to use the getAttribute method on the caller object. This object may not have this method, and its likely its assuming a different caller anyway (probably from addElement?).
I used a workaround to use getAttribute only if the caller variable is an object and has that method, but I don't think that's the correct solution. Not sure what should be done.
This workaround will not let me use setHelpButton on the 'htmleditor' though.
|
Show » |
| There are no comments yet on this issue.
|
|