Error: class 'ArtefactTypeComment' does not have a method 'validate_config_options'

Bug #1336111 reported by Ghada El-Zoghbi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Robert Lyon

Bug Description

Mahara: 1.10.0dev
OS: Linux
DB: Mysql (with prefix 'testing_')
Browser: FF

Steps to reproduce:

 - Log in as admin
 - Go to Administration/Extensions
 - configuring the Plugin type: artefact 'comment'
 - Select 'enable comment rating'.
 - Save.
 - Refresh the page to see the error:

[WAR] 35 (lib/mahara.php:1586) call_user_func_array() expects parameter 1 to be a valid callback, class 'ArtefactTypeComment' does not have a method 'validate_config_options'
Call stack (most recent first):

    log_message("call_user_func_array() expects parameter 1 to be a...", 8, true, true, "/var/www/maharacode/mahara/htdocs/lib/mahara.php", 1586) at /var/www/maharacode/mahara/htdocs/lib/errors.php:433
    error(2, "call_user_func_array() expects parameter 1 to be a...", "/var/www/maharacode/mahara/htdocs/lib/mahara.php", 1586, array(size 3)) at Unknown:0
    call_user_func_array(array(size 2), array(size 2)) at /var/www/maharacode/mahara/htdocs/lib/mahara.php:1586
    call_static_method("ArtefactTypeComment", "validate_config_options", object(Pieform), array(size 6)) at /var/www/maharacode/mahara/htdocs/admin/extensions/pluginconfig.php:116
    pluginconfig_validate(object(Pieform), array(size 6)) at Unknown:0
    call_user_func_array("pluginconfig_validate", array(size 2)) at /var/www/maharacode/mahara/htdocs/lib/pieforms/pieform.php:1382
    Pieform->validate(array(size 6)) at /var/www/maharacode/mahara/htdocs/lib/pieforms/pieform.php:505
    Pieform->__construct(array(size 9)) at /var/www/maharacode/mahara/htdocs/lib/pieforms/pieform.php:162
    Pieform::process(array(size 9)) at /var/www/maharacode/mahara/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 9)) at /var/www/maharacode/mahara/htdocs/admin/extensions/pluginconfig.php:78

Revision history for this message
Ghada El-Zoghbi (ghada-z) wrote :

Getting same issue for profiles:

[WAR] 69 (lib/mahara.php:1586) call_user_func_array() expects parameter 1 to be a valid callback, class 'ArtefactTypeProfile' does not have a method 'validate_config_options'

Robert Lyon (robertl-9)
Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
milestone: none → 1.10.0
status: New → In Progress
importance: Undecided → Low
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/3500

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3500
Committed: http://gitorious.org/mahara/mahara/commit/66301a003148b0d7a1fa9a695ee242c19b3761e9
Submitter: Ghada El-Zoghbi (<email address hidden>)
Branch: master

commit 66301a003148b0d7a1fa9a695ee242c19b3761e9
Author: Robert Lyon <email address hidden>
Date: Tue Jul 22 11:40:50 2014 +1200

Missing validate_config_options function error (Bug #1336111)

Problem is the line 1809 in lib/mahara.php namely
- [optional] validate_config_options() was not being respected

So I added a check to see if the function exists for the plugin before
trying to call it.

Signed-off-by: Robert Lyon <email address hidden>

Change-Id: Iceabeec423f67339903959fe4083bb87250cad12

Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.