Title: Save levels button does not work
Last modified: January 7, 2024

---

# Save levels button does not work

 *  Resolved [oneminduniv](https://wordpress.org/support/users/oneminduniv/)
 * (@oneminduniv)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/save-levels-button-does-not-work/)
 * The save levels button does not work. I’m not getting an error message; the button
   just does nothing.
 * Also: The DB tables are created, but they are empty; the only feature that saves
   data to the tables is the discount code.
 * The tables are using a custom prefix vs the standard wp prefix.
 * I am also using PMPRO alongside (integrated with) MasterStudy LMS.
 * WordPress Version: version: 6.4.2
 * Database server:
   Server: Localhost via UNIX socketServer type: MySQLServer connection:
   SSL is not being used DocumentationServer version: 8.0.35-cll-lve – MySQL Community
   Server – GPLProtocol version: 10Server charset: UTF-8 Unicode (utf8mb4)
 * Web server:
   cpsrvd 11.114.0.15Database client version: libmysql – mysqlnd 8.1.25PHP
   extension: mysqli Documentation curl Documentation mbstring DocumentationPHP 
   version: 8.1.25
 * Thank you

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Jason Coleman](https://wordpress.org/support/users/strangerstudios/)
 * (@strangerstudios)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/save-levels-button-does-not-work/#post-17324401)
 * Hi there. Sorry you’ve run into an issue here. Thanks for providing the details
   you have. If you can find a mysql error from when the levels try to save, that
   would be helpful too.
 * I trust you that the DB tables are set up, but if you wanted to make sure all
   of the required tables were there, you could compare them to the queries in the
   file here: [https://github.com/strangerstudios/paid-memberships-pro/blob/dev/includes/setup.sql](https://github.com/strangerstudios/paid-memberships-pro/blob/dev/includes/setup.sql)
 * In the past, things like this have come up where for some reason the levels table(
   and maybe the orders table too?) was setup with the autoincrement value set to
   0 and for some reason when we run the queries to insert the levels, it would 
   try to insert with ID 0 instead of 1. I think there are some combinations of 
   MySQL version and configuration where this might happen.
 * Manually setting the autoincrement value to 1 or inserting a level into the table
   through MySQL or a tool like Adminer (even if you later delete the level) would
   fix the issue and get the table defaulting new inserts with the appropriate ID.
 * I’m just throwing that out there as a possibility. It seems like you might have
   the technical know how to look into that.
 * To debug further, you could `var_dump( $wpdb )` at this part of the code, which
   should show any MySQL error that occurs on the insert. We can also get the exact
   DB query tried and see if there is an error in our SQL. [https://github.com/strangerstudios/paid-memberships-pro/blob/dev/classes/class-pmpro-levels.php#L172](https://github.com/strangerstudios/paid-memberships-pro/blob/dev/classes/class-pmpro-levels.php#L172)
 * Let me know if this helps and if you figure anything out. It’s possible we can
   update our code to keep this issue from happening for others on setups similar
   to yours.
 * Thanks.
 *  Thread Starter [oneminduniv](https://wordpress.org/support/users/oneminduniv/)
 * (@oneminduniv)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/save-levels-button-does-not-work/#post-17324436)
 * RE: “To debug further, you could var_dump( $wpdb )”
 * Not sure how to do this.
 * Thank you
 *  Thread Starter [oneminduniv](https://wordpress.org/support/users/oneminduniv/)
 * (@oneminduniv)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/save-levels-button-does-not-work/#post-17324537)
 * Update:
 * I uninstalled PMPRO ( all data ), and re-installed.
 * In the set-up (installation) screen, I selected create a free level. The free
   level was created, and shows in the DB table; but when adding a new level from
   the PMPRO dashboard, the save button does not work (when clicked there is no 
   action/response).
 * Thank you
 *  Plugin Support [Jarryd Long](https://wordpress.org/support/users/jarryd-long/)
 * (@jarryd-long)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/save-levels-button-does-not-work/#post-17324839)
 * Thank you for your feedback.
 * If you’re comfortable with editing some of the plugin files on your site, please
   navigate to paid-memberships-pro/classes/class-pmpro-levels.php and scroll down
   to approximately line 172.
 * Please add in the following line of code
 * `var_dump( $wpdb );`
 * Once added, try adding a level – some code will show up on the screen – please
   copy this and paste it into a reply here so that we can take a further look into
   this with you.
 *  Thread Starter [oneminduniv](https://wordpress.org/support/users/oneminduniv/)
 * (@oneminduniv)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/save-levels-button-does-not-work/#post-17326947)
 * Thank you for the info.
 * I have not tried the var_dump yet, But I disabled the MasterStudy LMS plugin,
   and now the save levels button is working, and data is saved to DB.
 * The MasterStudy LMS plugin is supposed to be compatible with PMP. I will contact
   the dev.
 * Thanks again
 *  Plugin Support [Jarryd Long](https://wordpress.org/support/users/jarryd-long/)
 * (@jarryd-long)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/save-levels-button-does-not-work/#post-17327898)
 * Thanks for letting us know – I hope they sort this out for you as soon as possible.
 * Feel free to reach out if there’s anything else we can assist you with by starting
   a new topic.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Save levels button does not work’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/paid-memberships-pro_f1dacb.svg)
 * [Paid Memberships Pro - Content Restriction, User Registration, & Paid Subscriptions](https://wordpress.org/plugins/paid-memberships-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paid-memberships-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paid-memberships-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/paid-memberships-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paid-memberships-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paid-memberships-pro/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Jarryd Long](https://wordpress.org/support/users/jarryd-long/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/save-levels-button-does-not-work/#post-17327898)
 * Status: resolved