Moodle

cannot backup some courses; Incorrect string "needed" in $status->info, please fix the code (table:user; old_id:1).

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Duplicate
  • Affects Version/s: 1.9.2
  • Fix Version/s: None
  • Component/s: Backup, Roles / Access
  • Labels:
    None
  • Environment:
    LAMP server
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

Cannot backup some courses; Moodle in debug mode says: "Incorrect string "needed" in $status->info, please fix the code (table:user; old_id:1)" With this error, I cannot backup over half of my courses and school will be starting soon.

Issue Links

Activity

Hide
David Mudrak added a comment -

I've got same problem here. I'm going to look for the problem.

Show
David Mudrak added a comment - I've got same problem here. I'm going to look for the problem.
Hide
Petr Škoda (skodak) added a comment -

My +1 to comment out the debugging message for now and keep it in 2.0

Show
Petr Škoda (skodak) added a comment - My +1 to comment out the debugging message for now and keep it in 2.0
Hide
David Mudrak added a comment -

Hi.

I have studied a code a bit and had a chat with skodak. The message Incorrect string "needed" ... is not a problem in fact. It is just a metter of format of SQL table mdl_backup_ids.

When backing up users, Moodle saves some serialized information into the field "info", e.g.:
s:14:"exists,needed,";
but in some cases, the value of "info" can be unserialized - just plain "needed". Skodak considered this as an issue and wanted to force somebody to fix saving plain "needed" into the SQL - that is why the error emerges. But it is just a sort of warning for developers. The backup should continue normally.

Please describe more details about the problem with the backup. otherwise I propose to close as "not a bug".

d.

Show
David Mudrak added a comment - Hi. I have studied a code a bit and had a chat with skodak. The message Incorrect string "needed" ... is not a problem in fact. It is just a metter of format of SQL table mdl_backup_ids. When backing up users, Moodle saves some serialized information into the field "info", e.g.: s:14:"exists,needed,"; but in some cases, the value of "info" can be unserialized - just plain "needed". Skodak considered this as an issue and wanted to force somebody to fix saving plain "needed" into the SQL - that is why the error emerges. But it is just a sort of warning for developers. The backup should continue normally. Please describe more details about the problem with the backup. otherwise I propose to close as "not a bug". d.
Hide
Eloy Lafuente (stronk7) added a comment -

Closing as duplicate of MDL-13641. Thanks for report.

We'll serialize/unserialize properly in that bug.

Show
Eloy Lafuente (stronk7) added a comment - Closing as duplicate of MDL-13641. Thanks for report. We'll serialize/unserialize properly in that bug.

People

Dates

  • Created:
    Updated:
    Resolved: