Title: ka2's Replies | WordPress.org

---

# ka2

  [  ](https://wordpress.org/support/users/ka2/)

 *   [Profile](https://wordpress.org/support/users/ka2/)
 *   [Topics Started](https://wordpress.org/support/users/ka2/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ka2/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ka2/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ka2/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ka2/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ka2/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 274 total)

1 [2](https://wordpress.org/support/users/ka2/replies/page/2/?output_format=md) 
[3](https://wordpress.org/support/users/ka2/replies/page/3/?output_format=md) … 
[17](https://wordpress.org/support/users/ka2/replies/page/17/?output_format=md) 
[18](https://wordpress.org/support/users/ka2/replies/page/18/?output_format=md) 
[19](https://wordpress.org/support/users/ka2/replies/page/19/?output_format=md) 
[→](https://wordpress.org/support/users/ka2/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Theme My Login] Occurred php warning when remove user on profile screen](https://wordpress.org/support/topic/occurred-php-warning-when-remove-user-on-profile-screen/)
 *  Thread Starter [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/occurred-php-warning-when-remove-user-on-profile-screen/#post-10343447)
 * Sorry at the lack of explanation.
 * I added custom process that the user can arbitrarily withdraw from the front 
   end profile screen using this plugin. It only happens in that case will be an
   error.
    Since I need to take measures to deter this error every time we update
   the plugin, I hope to incorporate the fix into core.
 * Thank you,
    -  This reply was modified 7 years, 11 months ago by [ka2](https://wordpress.org/support/users/ka2/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] shortcodes not working, cannot display table](https://wordpress.org/support/topic/shortcodes-not-working-cannot-display-table/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/shortcodes-not-working-cannot-display-table/#post-8279079)
 * Thank you for your inquiry.
 * The first option in the “Appearance and LookAndFeel” (that you specified) is 
   alternative option as “bootstrap_style” option of shortcode. When this option
   is checked, it’ll display data with table layout via “bootstrap” style. On the
   other hand, if this option is not checked, it’ll displayed data as JSON format.
   
   Therefore this’s a specification.
 * If you want to resolve the conflict of jQuery and underscore.js, you should optimize
   the “Loading Resources” option from plugin options.
 * Thank you,
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] Can’t Create Foreign Keys](https://wordpress.org/support/topic/cant-create-foreign-keys/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/cant-create-foreign-keys/#post-8278900)
 * Sorry for my late reply.
 * There are several reasons if you cannot create foreign key, and they will be 
   mentioned below.
 * 1. The DB engine of “Persons” table as reference table is not “InnoDB”, or The“
   Orders” is not “InnoDB”.
    2. The “P_Id” column in “Persons” table as reference
   table does not have index. 3. The “P_Id” column of both “Persons” table and “
   Orders” table does not have same column type.
 * Please try to check items above.
 * Also, if you checked the “Debug Mode” at “plugin options” menu, you can see detail
   why failed the table creation on the “Debug” tab.
 * Thank you,
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] core table](https://wordpress.org/support/topic/core-table/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/core-table/#post-8278805)
 * Sorry for my late reply.
 * You should enable the “Manage WP Core Tables” option from plugin options if you
   want to manage core tables of WordPress.
    Thereby, the “Core Tables” tab will
   be shown in the “CDBT Tables Management”.
 * Thank you,
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] creating table fails](https://wordpress.org/support/topic/creating-table-fails/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/creating-table-fails/#post-8245750)
 * Thank you for your inquiry.
 * You should specify character length as unique key if you add unique key to text
   type column. Please try to modify sql to as follows:
 *     ```
       CREATE TABLE wp_kdfl_jh (
         ID bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
         name text NOT NULL,
         current_amount decimal(20,2) unsigned NOT NULL DEFAULT '0.00',
         max_amount decimal(20,2) unsigned NOT NULL DEFAULT '0.00',
         avg decimal(20,2) unsigned NOT NULL DEFAULT '0.00',
         value decimal(20,2) unsigned NOT NULL DEFAULT '0.00' COMMENT 'percentage',
         created datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created Datetime',
         updated timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated Datetime',
         PRIMARY KEY (ID),
         UNIQUE KEY name (name(255))
       ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
       ```
   
 * Please try again.
    Thank you,
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] Change table fields’ name](https://wordpress.org/support/topic/change-table-fields-name/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/change-table-fields-name/#post-8238175)
 * Hi there,
 * If you add the column comment to each columns when you create table, those column
   comments will display as column index name.
    You can modify that table structure
   from “Modify Table” tab if you want to add the comment to columns after creating
   a table already. For example, there is as follows if you add comment to the “
   first_name” column.
 *     ```
       ALTER TABLE your_table_name MODIFY first_name varchar(100) NOT NULL COMMENT 'First Name';
       ```
   
 * Or, There is way to use the “cdbt_shortcode_custom_columns” filter, too.
    In 
   that case, please refer the ticket below:
 * [https://wordpress.org/support/topic/change-column-title/](https://wordpress.org/support/topic/change-column-title/)
 * Thank you,
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] Update hidden field at cdbt-entry](https://wordpress.org/support/topic/update-hidden-field-at-cdbt-entry/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/update-hidden-field-at-cdbt-entry/#post-8238078)
 * Thank you for your inquiry.
 * You should use the “cdbt_shortcode_custom_forms” filter if you want it.
    For 
   example, the way to use is as follows:
 *     ```
       function my_shortcode_custom_forms( $elements_options, $shortcode_name, $table ){
         $filtered_tables = [ 'your_table_name' ];
         $target_shortcodes = [ 'cdbt-entry', 'cdbt-edit' ];
         if ( ! is_admin() && in_array( $shortcode_name, $target_shortcodes ) && in_array( $table, $filtered_tables ) ) {
           foreach ( $elements_options as $_i => $_option ) {
             switch ( $_option['elementName'] ) {
               case 'current_date': // please modify to your column name
                 $elements_options[$_i]['elementType'] = 'hidden';
                 $elements_options[$_i]['defaultValue'] = date_i18n( 'Y-m-d' );
                 break;
             }
           }
         }
         return $elements_options;
       }
       add_filter( 'cdbt_shortcode_custom_forms', 'my_shortcode_custom_forms', 10, 3 );
       ```
   
 * However, there does not work code above when the type of hidden column is “date”
   type, because that’s a bug.
    If you want to perform as same case at the column
   of “date” type, please use together the filter hooks below.
 *     ```
       function my_cdbt_before_upsert_data( $data, $table_name, $field_format ){
         $filtered_tables = [ 'your_table_name' ];
         $filtered_column = 'current_date'; // please modify to your column name
         if ( in_array( $table_name, $filtered_tables ) ) {
           if ( array_key_exists( $filtered_column, $data ) ) {
             $data[$filtered_column] = date_i18n( 'Y-m-d' );
           }
         }
         return $data;
       }
       add_filter( 'cdbt_before_insert_data', 'my_cdbt_before_upsert_data', 10, 3 );
       add_filter( "cdbt_before_update_data", "my_cdbt_before_upsert_data", 10, 3 );
       ```
   
 * Please try it.
    Thank you,
    -  This reply was modified 9 years, 7 months ago by [ka2](https://wordpress.org/support/users/ka2/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] Errors when editing and deleting rows](https://wordpress.org/support/topic/errors-when-editing-and-deleting-rows/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/errors-when-editing-and-deleting-rows/#post-8224347)
 * Sorry for my late reply.
 * Perhaps, your table doesn’t have a primary key column?
    This plugin will be not
   able to handle specific row correctly if a table doesn’t have a primary key.
 * If so, you should add a primary key column to your table. In that case, please
   try to add a column to table from the “Modify Table” tab at the “CDBT Tables 
   Management”.
    For example, the sql to add a “id” column is as follows:
 *     ```
       ALTER TABLE your_table_name ADD id bigint(20) NOT NULL AUTO_INCREMENT primary key FIRST
       ```
   
 * Then, you should import all data again after you exported all data from that 
   table once. Thereby the data searching will work correctly because all data of
   that table has primary key index.
 * Please try it.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] Errors when editing and deleting rows](https://wordpress.org/support/topic/errors-when-editing-and-deleting-rows/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/errors-when-editing-and-deleting-rows/#post-8208659)
 * Thank you for your inquiry.
 * Happily, I just resolved problem of same case recently.
    You can resolve this
   problem by using the “cdbt_shortcode_custom_component_options” filter.
 * For example, please try to insert code below to your “functions.php”:
 *     ```
       function my_cdbt_shortcode_custom_component_options( $component_options, $shortcode_name, $table ){
         if ( is_admin() && $shortcode_name === "cdbt-edit" ) {
           $component_options['actionUrl'] = admin_url( str_replace( '/wp-admin', '', $component_options['actionUrl'] ) );
         }
         return $component_options;
       }
       add_filter( 'cdbt_shortcode_custom_component_options', 'my_cdbt_shortcode_custom_component_options', 10, 3 );
       ```
   
 * Also, please try to see this ticket together.
    [https://wordpress.org/support/topic/update-data-redirection/](https://wordpress.org/support/topic/update-data-redirection/)
 * Finally, I’m going to improve the core process that has been occurred this trouble
   at next plugin version. Therefore, it will be not necessary a code of filter 
   hook (above) since next version.
 * Thank you,
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] Change column title](https://wordpress.org/support/topic/change-column-title/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/change-column-title/#post-8204605)
 * Hi there,
 * In that case, you should use a “cdbt_shortcode_custom_columns” filter.
    For example
   used as follows:
 *     ```
       function my_shortcode_custom_columns( $columns, $shortcode_name, $table ){
         if ( 'cdbt-view' === $shortcode_name && 'your_table_name' === $table ) {
           foreach ( $columns as $_i => $_column ) {
             switch ($_column['property']) {
               case 'mes_nacimiento':
                 $columns[$_i]['label'] = 'Mes de Nacimiento';
                 break;
               case 'mail': // <- target column name
                 $columns[$_i]['label'] = 'Correo Electronico'; // <- displayed label
                 break;
               case 'telefono': 
                 $columns[$_i]['label'] = 'Telefono';
                 break;
   
             }
           }
         }
         return $columns;
       }
       add_filter( 'cdbt_shortcode_custom_columns', 'my_shortcode_custom_columns', 10, 3 );
       ```
   
 * Please try it, thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] Update data redirection](https://wordpress.org/support/topic/update-data-redirection/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/update-data-redirection/#post-8204562)
 * That error was for existing already the same function name in your functios.php.
   You should try to remove that code if functions.php has a code that added previous.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] Site loads to location of table, have to scroll to top manually](https://wordpress.org/support/topic/site-loads-to-location-of-table-have-to-scroll-to-top-manually/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/site-loads-to-location-of-table-have-to-scroll-to-top-manually/#post-8204548)
 * Thank you for describe.
    I was able to understand that thanks to you.
 * As you said, there has been navigated automatically to header of list component
   when displayed data list by using table layout in current version. Certainly,
   this action may be unhappy as common event.
    In current version, unfortunately
   you cannot disable completely that action. However you can avoid that action 
   by doing as follows.
 *     ```
       [cdbt-view table="your_table_name" enable_repeater="true" ajax_load="false"]
       ```
   
 * Also, there maybe occurs overflow memory of php if “ajax_load” option is false
   and you use large table that has many data.
 * I’m going to improve this unhappy common action after rendering component at 
   next version. Sorry, please wait for until releasing next version.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] How do I use the “Filtering Column Name” & “Filter Definition” options](https://wordpress.org/support/topic/how-do-i-use-the-filtering-column-name-filter-definition-options/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/how-do-i-use-the-filtering-column-name-filter-definition-options/#post-8204449)
 * In the current version, there is not supported completely to narrow down an int
   type column by the filtering box (dropdown list). Since next version, it will
   improve.
 * If you want to show simply rows which “SHE” column has “1”, I recommend that 
   you use “narrow_keyword” option as follows:
 *     ```
       [cdbt-view table="wp_dealers" narrow_keyword="SHE:1"]
       ```
   
 * Thank you,
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] Site loads to location of table, have to scroll to top manually](https://wordpress.org/support/topic/site-loads-to-location-of-table-have-to-scroll-to-top-manually/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/site-loads-to-location-of-table-have-to-scroll-to-top-manually/#post-8200802)
 * Thank you very much for reporting.
 * Sorry, I couldn’t understand your problem. I hope that you tell me more detail.
 * Thank you,
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom DataBase Tables] How do I use the “Filtering Column Name” & “Filter Definition” options](https://wordpress.org/support/topic/how-do-i-use-the-filtering-column-name-filter-definition-options/)
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/how-do-i-use-the-filtering-column-name-filter-definition-options/#post-8200787)
 * Thank you for your inquiry.
 * Please modify to as follow of your shortcode.
 *     ```
       [cdbt-view table="wp_dealers" bootstrap_style="true" enable_repeater="false" display_list_num="false" display_search="true" display_title="true" enable_sort="true" display_filter="true" display_view="false" draggable="true" display_index_row="true" footer_interface="pager" narrow_operator="and" display_cols="CName,Address,City,State,Phone1,EMail,Web" order_cols="CName,Address,City,State,Phone1,EMail,Web" sort_order="State:ASC" limit_items="2" truncate_strings="2" filter_column="SHE" filters="1" thumbnail_width="100" ajax_load="true"]
       ```
   
 * Important options for enabling the filter box on cdbt-view shortcode is below:
    - display_filter : It displays box if true.
    - filter_column : A column name is for filtering.
    - filters : The custom filtering values as dropdown list (optional if a filtering
      column is enum/set)
 * However, I found a bug in the “filters” option. In the currently version, when
   set pair of filter value and display label to “filters”, the value of display
   label was used as search value.
    Therefore, you should set filter value only 
   to the “filters” option.
 * Sorry, I’m going to fix this bug at next version.
 * Thank you,

Viewing 15 replies - 1 through 15 (of 274 total)

1 [2](https://wordpress.org/support/users/ka2/replies/page/2/?output_format=md) 
[3](https://wordpress.org/support/users/ka2/replies/page/3/?output_format=md) … 
[17](https://wordpress.org/support/users/ka2/replies/page/17/?output_format=md) 
[18](https://wordpress.org/support/users/ka2/replies/page/18/?output_format=md) 
[19](https://wordpress.org/support/users/ka2/replies/page/19/?output_format=md) 
[→](https://wordpress.org/support/users/ka2/replies/page/2/?output_format=md)