Title: Saving changes doesn&#8217;t work on custom plugin admin page
Last modified: May 18, 2020

---

# Saving changes doesn’t work on custom plugin admin page

 *  Resolved [dfad1ripe](https://wordpress.org/support/users/dfad1ripe/)
 * (@dfad1ripe)
 * [6 years ago](https://wordpress.org/support/topic/saving-changes-doesnt-work-on-custom-plugin-admin-page/)
 * I try to call this plugin from admin page of my plugin.
    I can view and edit 
   the referred table, but saving the changes does not happen. Ajax call passes 
   successfully but DB table is not updated.
 * There is saying my-plugin/settings.php page in WP admin interface, where I do:
 *     ```
       $table='wp_my_table';
       if(function_exists('add_db_table_editor')){
         add_db_table_editor(array(
          'title'=>'My title',
          'table'=>$table,
          'sql'=>"SELECT * FROM $table ORDER BY class_id ASC",
          'id_column'=>'class_id',
          'cap'=>'manage_options',
          'columnNameMap'=>Array(................),
          'default_values'=>Array(................)
         ));
         print(dbte_shortcode(Array('id'=>$table)));
       }
       ```
   
 * This displays the DBTE interface.
 * Then, when I do some changes and hit ‘Save changes’ button, the following ajax
   call happens:
 *     ```
       "page":"my-plugin/settings.php",
       "action":"dbte_save",
       "data":"{seem to be correct JSON data}",
       "table":"wp_my_table"}
       ```
   
 * I am confused by the fact that “page” here is referring back to the page where
   the editor is displayed. Should it refer to some DBTE component instead?
 * Do I miss some step that binds the frontend interface to DBTE backend?

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

 *  Plugin Author [bobbysmith007](https://wordpress.org/support/users/bobbysmith007/)
 * (@bobbysmith007)
 * [6 years ago](https://wordpress.org/support/topic/saving-changes-doesnt-work-on-custom-plugin-admin-page/#post-12854935)
 * Hey sorry you are having issues. That looks correct to me. Usually it just posts
   back to the same page. It was posted on. I will try to check into this soon
 *  Thread Starter [dfad1ripe](https://wordpress.org/support/users/dfad1ripe/)
 * (@dfad1ripe)
 * [6 years ago](https://wordpress.org/support/topic/saving-changes-doesnt-work-on-custom-plugin-admin-page/#post-12855328)
 * Thank you for the response.
 * Meanwhile I have created simple ‘static HTTP’ workaround to edit that table, 
   so I’m not blocked with this issue now, but your plugin is more functional than
   my solution so it would be great to have it working sooner or later.
 * Please let me know if you need some additional diagnostic data.
 * Just to add, I’m on WP 5.4.1, your plugin is not marked as tested with this version
   yet.
 *  Plugin Author [bobbysmith007](https://wordpress.org/support/users/bobbysmith007/)
 * (@bobbysmith007)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/saving-changes-doesnt-work-on-custom-plugin-admin-page/#post-13005437)
 * Did you ever look back into this? If its posting the ajax correctly, was there
   any error in your php log file or javascript console? What was the reply to that
   ajax request?
 *  Thread Starter [dfad1ripe](https://wordpress.org/support/users/dfad1ripe/)
 * (@dfad1ripe)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/saving-changes-doesnt-work-on-custom-plugin-admin-page/#post-13019445)
 * No, sorry. I decided to allow some non-experienced users to edit tables and thus
   will use my solution instead, where I limit their ability to do something wrong.
   So I won’t be using your tool in this project anymore.

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

The topic ‘Saving changes doesn’t work on custom plugin admin page’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-db-table-editor.svg)
 * [WP-DB-Table-Editor](https://wordpress.org/plugins/wp-db-table-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-db-table-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-db-table-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-db-table-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-db-table-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-db-table-editor/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [dfad1ripe](https://wordpress.org/support/users/dfad1ripe/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/saving-changes-doesnt-work-on-custom-plugin-admin-page/#post-13019445)
 * Status: resolved