I have 2 problems that may keep me from continuing to use WPDataTables.
Consider a site with two WPDataTable:
Table1 has 1 column:
Name (String)
Table2 has 2 columns:
Name (String Foreign Key to Table1 edited as a Single select Drop-down select list)
Phone (String)
First, when a page contains shortcodes for both tables on it, rows from the related foreign key do not show up in the select box when the foreign key row is created on the same page that the related row is created without a page refresh in between when the foreign key row was entered and the related row is created. That is, when we add a row to Table1 and then, without refreshing the page, attempt to add a row to Table2, the row just added to Table1 does not appear in the drop-down select box for Name in Table2.
I believe the problem here is that the domain for Table2.Name is pre-loaded when the page is loaded and not when a new Table2 row is created. We need an option to force Foreign Key data to be loaded when the new/edit form is presented to the user for entry.
Second, there appears to be no referential integrity maintained when a row from Table1 is deleted and it is referred to by one or more rows in Table2. In my opinion, there needs to be some kind of referential integrity rule established for the relationship. Either Refuse the Delete, Cascade the delete, or set the Foreign Key to NULL. Regardless of the option selected, again in my opinion, the foreign key should not just be left as-is (pointing to a row that will never be re-created).
Unfortunately, this is how the plugin works at the moment. Since both tables are on the same page, the second table wouldn't be able to pull the newly entered data without the page (or table) refresh.
In fact, even if they were on separate pages, you would still need to refresh table #2 to pull the new data. Currently, there are no built-in features to fix this.
You can add auto-refresh to the second table, and when the table is reloaded after that amount of time, the data will be shown.
I will pass this info to our developers, in hope they can fix it for one of the future versions.
I have 2 problems that may keep me from continuing to use WPDataTables.
Consider a site with two WPDataTable:
First, when a page contains shortcodes for both tables on it, rows from the related foreign key do not show up in the select box when the foreign key row is created on the same page that the related row is created without a page refresh in between when the foreign key row was entered and the related row is created. That is, when we add a row to Table1 and then, without refreshing the page, attempt to add a row to Table2, the row just added to Table1 does not appear in the drop-down select box for Name in Table2.
I believe the problem here is that the domain for Table2.Name is pre-loaded when the page is loaded and not when a new Table2 row is created. We need an option to force Foreign Key data to be loaded when the new/edit form is presented to the user for entry.
Second, there appears to be no referential integrity maintained when a row from Table1 is deleted and it is referred to by one or more rows in Table2. In my opinion, there needs to be some kind of referential integrity rule established for the relationship. Either Refuse the Delete, Cascade the delete, or set the Foreign Key to NULL. Regardless of the option selected, again in my opinion, the foreign key should not just be left as-is (pointing to a row that will never be re-created).
I forgot to ask: Are there options somewhere in WPDataTables that I am missing that would alleviate either of the issues?
Thanks
Hello George
Thank you for your purchase.
Unfortunately, this is how the plugin works at the moment. Since both tables are on the same page, the second table wouldn't be able to pull the newly entered data without the page (or table) refresh.
In fact, even if they were on separate pages, you would still need to refresh table #2 to pull the new data. Currently, there are no built-in features to fix this.
You can add auto-refresh to the second table, and when the table is reloaded after that amount of time, the data will be shown.
I will pass this info to our developers, in hope they can fix it for one of the future versions.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables