Course restore: error/setting_invalid_integer

Course restore: error/setting_invalid_integer

by Erackson Brito -
Number of replies: 4

Hello, everyone.

I am new to Moodle and am still on the process of merging multiple old instances into a brand new one (I am yet to reply this post with my steps through the journey) and now, at the course restore phase, I am facing many many warning and errors. Some of them I managed to solve, others I could find a good solution online (mainly in this forum) or had a friend to give precious advice. Even with all this source and support, I was not able to solve this one.

Some courses show me the following error when I try to restore:

error/setting_invalid_integer

Outras informações sobre este erro

× Debug info:
Error code: setting_invalid_integer
$a contents: 2542759200
× Stack trace:
  • line 456 of /backup/util/settings/base_setting.class.php: base_setting_exception thrown
  • line 164 of /backup/moodle2/restore_settingslib.php: call to base_setting->validate_value()
  • line 109 of /backup/util/settings/base_setting.class.php: call to restore_course_defaultcustom_setting->validate_value()
  • line 47 of /backup/util/settings/backup_setting.class.php: call to base_setting->__construct()
  • line 34 of /backup/util/settings/course/course_backup_setting.class.php: call to backup_setting->__construct()
  • line 201 of /backup/moodle2/restore_course_task.class.php: call to course_backup_setting->__construct()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_course_task->define_settings()
  • line 60 of /backup/util/plan/base_plan.class.php: call to base_task->set_plan()
  • line 199 of /backup/moodle2/restore_plan_builder.class.php: call to base_plan->add_task()
  • line 114 of /backup/moodle2/restore_plan_builder.class.php: call to restore_plan_builder::build_course_plan()
  • line 74 of /backup/util/plan/restore_plan.class.php: call to restore_plan_builder::build_plan()
  • line 513 of /backup/controller/restore_controller.class.php: call to restore_plan->build()
  • line 143 of /backup/controller/restore_controller.class.php: call to restore_controller->load_plan()
  • line 86 of /backup/restore.php: call to restore_controller->__construct()

That's my path until I got here:
Problem: Merge 4 2.6.2+ Moodle instances into a brand new 3.5.1

Solution: 

  1. upgrade each instance to 3.5.1;
  2. in order to achieve 1. I had to upgrade each in instance to 2.7, then to 3.1, then to 3.5.1;
  3. configure automated backup and execute them;
  4. restore those backup file into the brand new 3.5.1 instance

I will be really grateful if any of you feel like helping with your experience or any other kind of insight. 

--
Erackson

Average of ratings: -
In reply to Erackson Brito

Re: Course restore: error/setting_invalid_integer

by Ken Task -
Picture of Particularly helpful Moodlers

So am trying to understand ... you upgraded X number of Moodle 2.6.x sites via a mini-march to 3.5.1.  

Then ran autobackups on courses.   And now you are trying to restore those autobackups to another 3.5.1 in order to 'merge' all sites into one.

So did the upgrades to the 2.6's go off without any errors?  Got them to 3.5.1 with no issues?

Did you check any of the courses for course formats addons after those 2.6's were mini-marched to 3.5.1's?

Do you have any addons for course formats that are need of updating?   Are the course formats that were in the 2.6's compat with 3.5.1?

Have to confess, have never seen that error before.    Above is really guessing.

'spirit of sharing', Ken


In reply to Ken Task

Re: Course restore: error/setting_invalid_integer

by Erackson Brito -

Hello, Ken. Have to confess I 'love your spirit'.

You got it right. I did this mini-march at least 4x.

So did the upgrades to the 2.6's go off without any errors?  Got them to 3.5.1 with no issues?

There were some issues regarding PHP version and data format. So, at some point, I had to change PHP version and php admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci in order to be able to continue.

Did you check any of the courses for course formats addons after those 2.6's were mini-marched to 3.5.1's?

I might not be looking at the right place, but in the plugin overview there aren't any addons (plugins?) for course format. There are, though, for mod, blocks, enrol and theme.

I am hopeful that at some point a blessed guess will help us out.

--
Erackson

In reply to Ken Task

Re: Course restore: error/setting_invalid_integer

by Erackson Brito -

So, while I was writing the first response, I downloaded the spirit of guessing and spotted the 'restore_course_defaultcustom_setting->validate_value()' and thought that that content number could be somewhere in the backup file. So I made a file search for that number and figured it was set as timestamp for startdate. It points, though, to Saturday, 30 July 2050 02:00:00. So I thought that would be the problem and changed it in the DB, manually backed up the course and tried restoring it again. It worked!

Don't ask me how it got that messed, just believe me when I say this value came with the dump files my client sent me.

Anyway, thanks, Ken, for your time and 'spirit of sharing'.

--
'spirit of guessing', Erackson


Average of ratings: Useful (1)
In reply to Erackson Brito

Re: Course restore: error/setting_invalid_integer

by Ken Task -
Picture of Particularly helpful Moodlers

Congrats!  Good 'sluething' ... (guessing) ... whatever gets you down the road/works! smile

'spirit of sharing', Ken