Saving changes doesn’t 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)
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.