Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1458815

Summary: Update fails when doing initial setup
Product: [Fedora] Fedora EPEL Reporter: Oliver I <oisaac>
Component: moodleAssignee: Gwyn Ciesla <gwync>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: el6CC: gwync
Target Milestone: ---   
Target Release: ---   
Hardware: noarch   
OS: All   
Whiteboard:
Fixed In Version: moodle-2.6.11-6.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-21 07:46:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Oliver I 2017-06-05 14:13:36 UTC
Description of problem:

When updating to 2.6.11-5.epel6, the update fails when going through the prompts. SSL Error Messages say:

"PHP Fatal error:  Call to a member function addModule() on a non-object in /app/httpd/www/moodle/web/lib/weblib.php on line 1793"


Version-Release number of selected component (if applicable):

2.6.11-5

How reproducible:

Error message is generated on every refresh


Steps to Reproduce:
1. Install older version of moodle
2. Install update of Moodle to 2.6.11-5
3. Log into Moodle as admin and follow the prompts. When upgrading modules it will give a 500.

Actual results:

500 server error


Expected results:

Successful update of moodle


Additional info:

I temp-fixed the issue by moving line 1793 so it is in the if statement starting at line 1783. When it is outside the if statement, the $def object is not guaranteed to be created and hence the error. When it is inside the if statement, the $def object will exist and thus it will update successfully.

Comment 1 Oliver I 2017-06-05 14:46:00 UTC
The problem persists even after the upgrade. Logging in and logging out cause the 500 error to happen as well.

Comment 2 Gwyn Ciesla 2017-06-05 14:47:04 UTC
Does your temporary fix work?

Comment 3 Oliver I 2017-06-05 15:40:43 UTC
Yes, if you implement the temporary fix, everything works as it should. Moving the fatal line into the if block fixes it in all situations.

Comment 4 Gwyn Ciesla 2017-06-05 15:49:56 UTC
Excellent, I'll get an update out.

Comment 5 Fedora Update System 2017-06-05 16:00:02 UTC
moodle-2.6.11-6.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-25d48f77d0

Comment 6 Fedora Update System 2017-06-06 11:50:27 UTC
moodle-2.6.11-6.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-25d48f77d0

Comment 7 Fedora Update System 2017-06-21 07:46:57 UTC
moodle-2.6.11-6.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.