## General developer forum

### enrol plugin producing error all of a sudden

enrol plugin producing error all of a sudden

I was running 2.4.x and had a custom enrollment plugin, everything was working great. When 2.5 first came out, I updated a development instance of the moodle installation. I could have sworn the plugin was working at that point (although I could be wrong.)

Now when I try to proceed with an enrollment I am receiving the following error when it tries to add the enrollment user association.

Debug info: Column count doesn't match value count at row 1

INSERT INTO mdl_user_enrolments (enrolid,status,userid,timestart,timeend,modifierid,timecreated,timemodified) VALUES(?,?,?,?,?,?,?,?)

[array (

0 => '16',

1 => 0,

2 => '2',

3 => 0,

4 => 0,

5 => '2',

6 => 1372196643,

7 => 1372196643,

)]

Error code: dmlwriteexception

Stack trace:

• line 426 of /lib/dml/moodle_database.php: dml_write_exception thrown
• line 1089 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
• line 1131 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
• line 1294 of /lib/enrollib.php: call to mysqli_native_moodle_database->insert_record()
• line 223 of /enrol/stripe/process.php: call to enrol_plugin->enrol_user()

Line 223 of my enrollment process script:

$plugin->enrol_user($plugin_instance, $user->id,$plugin_instance->roleid, $timestart,$timeend);

I count 8 fields and 8 values but I am sure I am missing something simple.

The process script does write to another database file without a problem earlier in the script.

Any help or suggestions would greatly be appreciated.

Moodle 2.5, Centos/cpanel Server

Furthermore it appears everything is having the issue as even trying to do a manual enrollment results in the same error.

Average of ratings: -
Re: enrol plugin producing error all of a sudden

Average of ratings: -
Re: enrol plugin producing error all of a sudden

Since this isn't related to the development of a plugin I opened a different thread in the general help forum.

https://moodle.org/mod/forum/view.php?id=50

Average of ratings: -
Re: enrol plugin producing error all of a sudden

hi Brian,

did you ever find any solution for this? and/or do you know if there is a plugin for Stripe available for Moodle?

Average of ratings: -
Re: enrol plugin producing error all of a sudden

Hi Brian,

having similar issues where did you move the discussion too and was there a resolution?

Average of ratings: -