Moodle

Wrong include in group/index.php

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.8.7
  • Fix Version/s: 1.8.9
  • Component/s: Groups
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

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

Issue Links

Activity

Hide
Chris Potter added a comment -

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

Show
Chris Potter added a comment - 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
Hide
Petr Škoda (skodak) added a comment -

I suppose this was already fixed in cvs, but there are still some problems with cvs update, right Nicolas?

Show
Petr Škoda (skodak) added a comment - I suppose this was already fixed in cvs, but there are still some problems with cvs update, right Nicolas?
Hide
Nicolas Connault added a comment -

There may be, but I have no idea how this can be solved.

Show
Nicolas Connault added a comment - There may be, but I have no idea how this can be solved.
Hide
Tim Hunt added a comment -

Adjusting bogus fix version.

Show
Tim Hunt added a comment - Adjusting bogus fix version.
Hide
Clinton Branscombe added a comment -

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.

Show
Clinton Branscombe added a comment - 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.
Hide
Tim Hunt added a comment -

What exactly is the problem here. Why can't we solve it?

Show
Tim Hunt added a comment - What exactly is the problem here. Why can't we solve it?
Hide
Nicolas Connault added a comment -

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.

Show
Nicolas Connault added a comment - 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.
Hide
Dakota Duff added a comment -

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

Show
Dakota Duff added a comment - 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
Hide
Clinton Branscombe added a comment -

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.

Show
Clinton Branscombe added a comment - 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.
Hide
Dubhgan Hinchey added a comment -

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.

Show
Dubhgan Hinchey added a comment - 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.
Hide
Tim Hunt added a comment -

-dP is correct. See http://docs.moodle.org/en/CVS_for_Administrators.

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

Show
Tim Hunt added a comment - -dP is correct. See http://docs.moodle.org/en/CVS_for_Administrators. I guess that means that this issue can be closed now?
Hide
Petr Škoda (skodak) added a comment -

most probably upgrade issue only, the code looks ok

Show
Petr Škoda (skodak) added a comment - most probably upgrade issue only, the code looks ok

Dates

  • Created:
    Updated:
    Resolved: