• Resolved oneminduniv

    (@oneminduniv)


    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 socket
    Server type: MySQL
    Server connection: SSL is not being used Documentation
    Server version: 8.0.35-cll-lve – MySQL Community Server – GPL
    Protocol version: 10
    Server charset: UTF-8 Unicode (utf8mb4)

    Web server:
    cpsrvd 11.114.0.15
    Database client version: libmysql – mysqlnd 8.1.25
    PHP extension: mysqli Documentation curl Documentation mbstring Documentation
    PHP version: 8.1.25

    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jason Coleman

    (@strangerstudios)

    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

    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

    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

    (@oneminduniv)

    RE: “To debug further, you could var_dump( $wpdb )”

    Not sure how to do this.

    Thank you

    Thread Starter oneminduniv

    (@oneminduniv)

    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

    (@jarryd-long)

    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

    (@oneminduniv)

    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

    (@jarryd-long)

    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.