Issue Details (XML | Word | Printable)

Key: MDL-16916
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Nicolas Connault
Reporter: Andrea Bicciolo
Votes: 3
Watchers: 5
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Wrong include in group/index.php

Created: 17/Oct/08 08:42 PM   Updated: 09/Apr/09 03:17 PM
Return to search
Component/s: Groups
Affects Version/s: 1.8.7
Fix Version/s: 1.8.9

Issue Links:
Dependency
 
Duplicate
 

Participants: Andrea Bicciolo, Chris Potter, Clinton Branscombe, Dakota Duff, Dubhgan Hinchey, Nicolas Connault, Petr Skoda and Tim Hunt
Security Level: None
Resolved date: 09/Apr/09
Affected Branches: MOODLE_18_STABLE
Fixed Branches: MOODLE_18_STABLE


 Description  « Hide
All 1.8.7 versions now has group/index.php with the following include:

require_once('HTML/AJAX/JSON.php');

This lead to a php fatal error and group interface no more accessible.

Commenting it out group interfaces is back again

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Chris Potter added a comment - 30/Oct/08 10:45 PM
Shouldn't the include be:

require_once($CFG->libdir.'/json/JSON.php');

Also, on lines 83 and 91 have "json_encode"... I don't see that function in the include (or anywhere in Moodle actually). Is it supposed to be just "encode" (which does exist under the include listed above)?

Thanks


Petr Skoda added a comment - 06/Nov/08 06:00 AM
I suppose this was already fixed in cvs, but there are still some problems with cvs update, right Nicolas?

Nicolas Connault added a comment - 10/Nov/08 11:01 PM
There may be, but I have no idea how this can be solved.

Tim Hunt added a comment - 11/Dec/08 01:48 AM
Adjusting bogus fix version.

Clinton Branscombe added a comment - 09/Jan/09 03:20 AM
This continues to be an issue in 1.9.3+ (Build: 20090106). With debugging set at MINIMAL, a blank page appears, but when set to ALL the following message appears:

Warning: require_once(HTML/AJAX/JSON.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/moodle/group/index.php on line 14

Fatal error: require_once() [function.require]: Failed opening required 'HTML/AJAX/JSON.php' (include_path='/var/www/moodle/lib/pear:/var/www/moodle/lib/pear:.:/usr/share/php:/usr/share/pear') in /var/www/moodle/group/index.php on line 14

This server has never had anything other version than 1.9 on it.


Tim Hunt added a comment - 20/Jan/09 11:06 AM
What exactly is the problem here. Why can't we solve it?

Nicolas Connault added a comment - 22/Jan/09 06:00 PM
Clinton (and whoever still has problems with this), which version did you update FROM? This may be important in determining the cause of this annoyingly unreproducible bug.

Dakota Duff added a comment - 06/Feb/09 02:10 PM
At least in one user's case the problem was that the AJAX directory doesn't even exist. This user installed Moodle via CVS and had the latest version.

More here: http://moodle.org/mod/forum/discuss.php?d=114351


Clinton Branscombe added a comment - 18/Feb/09 04:41 AM
The server was set up with CVS on Ubuntu last summer and has been updated via CVS about once a month since. Unfortunately I did not keep track of every version at every update.

I need to mention one other interesting factor since my last post: I had been using "cvs -q update" However, the last update I used "cvs -dP update" This seems to have resolved the blank page that previously appeared when trying to set up groups. I am not sure why the "P" option (Pruning empty directories) fixed the situation.


Dubhgan Hinchey added a comment - 18/Feb/09 10:03 AM
A thank you to Dakato Duff for their advice in the GROUPS forum.

I didn't have an AJAX directory. I tried the suggestion from Duff to copy their AJAX directory. I did, but then when I updated using CVS, CVS wouldn't recognize the directory.
like thise
?AJAX

I would always update via CVS using like this:
(from /var/www/moodle)

cvs -q update

I tried what Clinton Branscombe did but just got an error from CVS. I am running moodle on a Debian LAMP server.

I searched around and found this reference for updating with CVS: http://www.csse.uwa.edu.au/~gian/cvsintro.html#update

I tired this command with cvs

cvs update -dP

This fixed the groups problem. I now also have an AJAX.php file and AJAX directory in my var/www/moodle/lib/pear/HTML directory.
I hope this helps other folks. It is great to be able to make Groups now.


Tim Hunt added a comment - 18/Feb/09 11:15 AM
-dP is correct. See http://docs.moodle.org/en/CVS_for_Administrators.

I guess that means that this issue can be closed now?


Petr Skoda added a comment - 09/Apr/09 03:17 PM
most probably upgrade issue only, the code looks ok