Logged in as administrator I created a wpdatatable (2.0.2) with an SQL Query as data source. The SQL Query also creates a user ID column which I have set as integer. The wpdatatable shows the rows with users and their data perfectly. Then I set the editing options to allow users to see and edit their data. Editor roles set to all available roles, just for testing. Shortcode pasted in to a page for front-end users.
I am still in the back-end in wpdatatables as admin, but by setting the user edit option, the table changes from all data visible to "No data available in table" Main problem: if one of the users logs in in the front-end, the table is showing also "No data available in table".
I cannot see how to get it done. Can you please help? If you need I can provide admin credentials.
Sorry for late response. We were closed during New Year holidays.
Yes they are see this message because they didn't insert own data yet. When you insert data like administrator that data will be visible only to you.If you already insert some data for users, you should check which is they user id. You can look in our documentation about Creating Editable Tables in WordPress where users can see and edit only their own data.
Maybe I was not very clear. We have no intention to have the front-end user edit or insert data. He just needs to see his own data when he is logged in.
Please have a look at attached image. Our SQL query retrieves data from database per user. You see ID's of admin (1) and users 9 and 11. The column is called ID. The preview is fine (I am logged in as admin) As soon as I set the option "Limit editing to own data only", the preview table says "No data available in table" Then, if the user (11) logs in in the front-end he gets the same message "No data available in table".
If I disable the option "Limit editing to own data only", the front-end user sees the data of all users.
If your MySQL-query based wpDataTable doesn’t work correctly with server-side processing, probably this is happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (happens rarely, but does sometimes). To avoid this please prepare a MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.
OK, Never done it but I will try to create a view on the database of the entire query. Hope it will resolve the problem because having the frontend user see only his own data is of top-priority for us. When I have results I will inform you.
Views on the database are perfectly working. Thank you for that. Question: Is it possible that front-end users can only watch their data and not being able to edit? We run queries especially for reading, not editing.
Dear ..
Logged in as administrator I created a wpdatatable (2.0.2) with an SQL Query as data source.
The SQL Query also creates a user ID column which I have set as integer. The wpdatatable shows the rows with users and their data perfectly.
Then I set the editing options to allow users to see and edit their data. Editor roles set to all available roles, just for testing. Shortcode pasted in to a page for front-end users.
I am still in the back-end in wpdatatables as admin, but by setting the user edit option, the table changes from all data visible to "No data available in table"
Main problem: if one of the users logs in in the front-end, the table is showing also "No data available in table".
I cannot see how to get it done. Can you please help?
If you need I can provide admin credentials.
Thank you.
With regards,
DV
Hi DV,
Thank you for your purchase.
Sorry for late response. We were closed during New Year holidays.
Yes they are see this message because they didn't insert own data yet. When you insert data like administrator that data will be visible only to you.If you already insert some data for users, you should check which is they user id. You can look in our documentation about Creating Editable Tables in WordPress where users can see and edit only their own data.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Mr. Milan
Happy an prosperous new year to you.
Maybe I was not very clear. We have no intention to have the front-end user edit or insert data. He just needs to see his own data when he is logged in.
Please have a look at attached image.
Our SQL query retrieves data from database per user. You see ID's of admin (1) and users 9 and 11.
The column is called ID. The preview is fine (I am logged in as admin)
As soon as I set the option "Limit editing to own data only", the preview table says "No data available in table"
Then, if the user (11) logs in in the front-end he gets the same message "No data available in table".
If I disable the option "Limit editing to own data only", the front-end user sees the data of all users.
Hope this helps.
Thanks,
DV
Hi DV,
If your MySQL-query based wpDataTable doesn’t work correctly with server-side processing, probably this is happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (happens rarely, but does sometimes). To avoid this please prepare a MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.
Let me know the results.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Mr. Milan,
Is that the also the reason that the same problem happens on your demo site with this little query I made there?
Thanks,
DV
Hi DV,
Yes this is probably happening because wpDataTables server has problems with parsing of the query and building new queries dynamically.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Mr Milan,
OK, Never done it but I will try to create a view on the database of the entire query.
Hope it will resolve the problem because having the frontend user see only his own data is of top-priority for us.
When I have results I will inform you.
Thanks
DV
Hi DV,
Ok. Let me know the results.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Milan,
Views on the database are perfectly working. Thank you for that.
Question:
Is it possible that front-end users can only watch their data and not being able to edit?
We run queries especially for reading, not editing.
Thanks,
with regards,
DV
Hi dvalck,
You are welcome.
To hide those buttons you can add this CSS on Custom CSS field on wpDataTables settings page or directly on the page between <style></style> tags:
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Milan,
Thank you for your help.
Would it be an idea to have a front-end "read-only" option in some next release?
By the way.. this is a wonderful product. Best there is.
with regards,
DV
Hi DV,
You are welcome. Thank you for your suggestion. I will forward this to my team to think about this like a new feature in future.
If you have any more issues feel free to open a new ticket, we will gladly help.
We'd greatly appreciate it if you could take a minute and leave a review on CodeCanyon on this link. Thanks!
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables