1.82 Upgrade problems

1.82 Upgrade problems

James Whitacre -
回帖数:5
Hi...I upgraded our site yesterday from 1.72 to 1.82+.

I started getting this message when I view any user account:
Notice: Undefined property: stdClass::$debugdisplay in "mypathonserver"/user/view.php on line 456

Also, I'm also getting errors on 8 of our 14 courses on backups now?

We did the utf-8 upgrade when going from 1.6 to 1.7 last year.

Right now everything else seems to be working just fine.

Anybody have some ideas?

Thanks in advance.

James

回复James Whitacre

Re: 1.82 Upgrade problems

James Whitacre -
When I run a check on the Tables in PhpMyAdmin...I get the following errors:
Problems with indexes of table `mdl_context_rel`
UNIQUE and INDEX keys should not both be set for column `c1`
Problems with indexes of table `mdl_groups_courses_groupings`
UNIQUE and INDEX keys should not both be set for column `courseid`
Problems with indexes of table `mdl_groups_courses_groups`
UNIQUE and INDEX keys should not both be set for column `courseid`
Problems with indexes of table `mdl_groups_groupings_groups`
UNIQUE and INDEX keys should not both be set for column `groupingid`
Problems with indexes of table `mdl_groups_members`
UNIQUE and INDEX keys should not both be set for column `groupid`
Problems with indexes of table `mdl_log`
More than one INDEX key was created for column `course`
Problems with indexes of table `mdl_newnameforthetable`
PRIMARY and INDEX keys should not both be set for column `id`
Problems with indexes of table `mdl_post`
PRIMARY and INDEX keys should not both be set for column `id`
Problems with indexes of table `mdl_role_allow_assign`
UNIQUE and INDEX keys should not both be set for column `roleid`
Problems with indexes of table `mdl_role_allow_override`
UNIQUE and INDEX keys should not both be set for column `roleid`
Problems with indexes of table `mdl_role_assignments`
UNIQUE and INDEX keys should not both be set for column `contextid`
Problems with indexes of table `mdl_role_capabilities`
UNIQUE and INDEX keys should not both be set for column `roleid`
Problems with indexes of table `mdl_role_names`
UNIQUE and INDEX keys should not both be set for column `roleid`
Problems with indexes of table `mdl_scorm_scoes_track`
UNIQUE and INDEX keys should not both be set for column `userid`
Problems with indexes of table `mdl_scorm_seq_mapinfo`
UNIQUE and INDEX keys should not both be set for column `scoid`
Problems with indexes of table `mdl_scorm_seq_objective`
UNIQUE and INDEX keys should not both be set for column `scoid`
Problems with indexes of table `mdl_scorm_seq_rolluprule`
UNIQUE and INDEX keys should not both be set for column `scoid`
Problems with indexes of table `mdl_scorm_seq_rolluprulecond`
UNIQUE and INDEX keys should not both be set for column `scoid`
Problems with indexes of table `mdl_scorm_seq_rulecond`
PRIMARY and INDEX keys should not both be set for column `id`
Problems with indexes of table `mdl_scorm_seq_ruleconds`
UNIQUE and INDEX keys should not both be set for column `scoid`
Problems with indexes of table `mdl_user_lastaccess`
UNIQUE and INDEX keys should not both be set for column `userid`

回复James Whitacre

Re: 1.82 Upgrade problems

Richard Enison -

JW,

I don't believe the msg. you showed in your post is an error. As it says, it is a notice; kind of like a warning. Somewhere along the line, you (or a fellow admin) must have raised the error display level to show notices and warnings as well as errors. I would ignore it, and go into admin to lower the display level.

Under the circumstances, my guess is that the other errors you mentioned aren't errors either.

RLE

回复Richard Enison

Re: 1.82 Upgrade problems

James Whitacre -
RLE,

Thanks for your input. I checked the actually code that's being referred to:

if ($CFG->debugdisplay && debugging('', DEBUG_DEVELOPER) && $USER->id == $user->id) { // Show user object
echo '<hr />';
print_heading('DEBUG MODE: User session variables');
print_object($USER);
}

The thing is that I'm the only admin and I didn't change any of the security settings...all I did was upgrade from 1.72+ to 1.82+ and this began to show up. I checked in Admin and I don't even see an area where I can change these settings? Is this a PHP thing? I'm no programmer...just know enough to be "dangerous"!

Perhaps the above doesn't really matter anyway (just annoying) since as the admin...I'm the only one that can really see this as well?

JW

PS.
Also, thanks for the info from the tracker you sent as well. I see that its not a "serious" issue, but it still seems annoying. I guess this is just the "leftovers" from starting with an earlier database and continually upgrading.
回复James Whitacre

Re: 1.82 Upgrade problems

Richard Enison -

JW,

  1. You are correct about the code. What is going on is the if statement is testing whether all of three conditions are true, in which case the three statements within the curly braces would be executed. I think $CFG->debugdisplay is a property that is set in the admin script if debugging is enabled by the administrator (you); if not, it is undefined, which in PHP is interpreted as false, so the curly brace block is skipped. This is not an error in PHP, although it would be in some other languages, which might be the reason for the notice. The funny thing is that one normally would expect the notice to be displayed only if you had enabled debugging, in which case the notice would not apply! big grin
  2. There are settings in php.ini that normally would affect the display of notices, warnings, and error msgs., but it is my understanding that they are overridden in Moodle 1.8.
  3. FYI to learn how to change debug settings in Moodle, see http://docs.moodle.org/en/Debugging.

RLE