Plugin Author
ka2
(@ka2)
Thank you for your inquiry.
I describes the shortcode options “Exclude Columns”, “Display Columns”, and “Column Order”. Since the function of these three options overlap, we have established a priority.
“Column Order” > “Display Columns” > “Exclude Columns” as priority order
If the value is set to “Column Order”, the setting of “Display Columns” and “Exclude Columns” will be ignored.
This specification is intended to to have a short code and compatibility that was created in version 1.x of the plugin. I’m sorry for confusing you.
Also, as you say, matter of “Enable Switching View” is a bug. I’m going to fix at the next version.
Finally, it is a matter to get an error of “headers already sent”. Because at the outputting of shortcode in CDBT plugin is necessary to once buffering as processing, it seems the impact has gone out. Consider whether there is a workaround.
Thank you,
Thanks for the reply. I tried adding column rows only to the “Column Order” just now and also received the result that there is “No data in this table.” Here’s the long version of the short code:
[cdbt-view table="database_table" bootstrap_style="true" enable_repeater="true" display_list_num="false" display_search="true" display_title="true" enable_sort="true" display_index_row="true" order_cols="col2,col3,col4,col5,col6" sort_order="LastName:asc,FirstName:asc" limit_items="50" truncate_strings="0" image_render="responsive" display_filter="false" display_view="false" thumbnail_width="100" ajax_load="false"]
Thanks!
Plugin Author
ka2
(@ka2)
Does columns from “col2” to “col6” that are specified in the “order_cols” exist in the table?
I have tried at the following table:
CREATE TABLE database_table (
ID bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
LastName varchar(100) DEFAULT NULL,
FirstName varchar(100) DEFAULT NULL,
col1 varchar(100) DEFAULT NULL,
col2 varchar(100) DEFAULT NULL,
col3 varchar(100) DEFAULT NULL,
col4 varchar(100) DEFAULT NULL,
col5 varchar(100) DEFAULT NULL,
col6 varchar(100) DEFAULT NULL,
col7 varchar(100) DEFAULT NULL,
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)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4
Shortcode is as follows:
[cdbt-view table="database_table" bootstrap_style="true" enable_repeater="true" display_list_num="false" display_search="true" display_title="true" enable_sort="true" display_index_row="true" order_cols="col2,col3,col4,col5,col6" sort_order="LastName:asc,FirstName:asc" limit_items="0" truncate_strings="0" image_render="responsive" display_filter="false" display_view="false" thumbnail_width="100" ajax_load="false"]
I has been successfully displayed in the above test.
Thank you,
For the Relevanssi issue, you can get the development version here: https://wordpress.org/plugins/relevanssi/developers/
and that might help with the Relevanssi problem. The development version will block the [cdbt-view] shortcode when Relevanssi indexes posts.
Plugin Author
ka2
(@ka2)
Thank you for reply.
I will examine that problem.
Plugin Author
ka2
(@ka2)
I tried the coexistence of “Relevanssi” plugin and “Custom DataBase Tables” plugin.
As you say, it occurred an error of “header already sent” when I updated the post that contains the shortcodes of “Custom DataBase Tables” plugin.
To avoid this problem, I unchecked of the “Expand shortcodes in post content” at the “Relevanssi Search Options” of the “Relevanssi” plugin, then I could be successfully updated without error.
Thank you,
Mikko, thanks for jumping in! When I block the shortcode I take it Relevanssi will not be able to index the information that the shortcode references, which in this case is important to be indexed and findable through the search. Am I correct?
ka2,
Thanks for the update to the plugin it fixed the issues people were reporting… I realized today as I read your comment from 2 days ago that:
Does columns from “col2” to “col6” that are specified in the “order_cols” exist in the table?
means I am suppose to use the names of the actual columns, not simply col2,col3, etc. So once I changed those to the actual names of the columns it worked fine.
Yes, if the shortcode is blocked, the content can’t be indexed. That’s unfortunate, but if the shortcode doesn’t work with Relevanssi, there isn’t much you can do about it.