We've tried this on both our main site and staging site, and totals for any table never work.
We have tables with SQL data sources, and when we're designing or displaying the table, for a fraction of a second we sometimes see the correct totals, but then they quickly revert to 0 and stay at 0.
These issues usually occur when using complex queries with multiple JOINS, or if the data in the table is not all integer or float, but instead string.
If you still cannot locate the issue, could you please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.
It's definitely the sum query being done by wpdatatables:
Unknown column 'total' in 'field list' for query SELECT SUM(`total`) AS `total`, SUM(`sales`) AS `sales` FROM `3gf10_posts` ord WHERE ord.post_type = 'shop_order' AND eventid.meta_value > 0 AND ord.post_date >= '2019-07-01' AND ord.post_date < '2019-07-18' GROUP BY eventid.meta_value
is there a filter available to mod the sum query before it's executed? I see a filter for the limit query, but couldn't find one for this query.
You can take a look at available filters, and see if there's anything that could help you out there.
If you cannot get it to work, could you please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.
I see all three tables are pulling meta values, using LEFT JOIN and GROUP BY functions, so that may be causing the issue here.
This is probably happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (rarely happens, 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″.
Please note some this when working with the server-side processing feature:
Please do not use “LIMIT” in the SELECT statement. wpDataTables adds it automatically and it will be overridden.
Please do not use “ORDER BY” in the SELECT statement. wpDataTables has its own sorting engine so it makes no sense to use MySQL’s sorting, since it will be overridden. Also, server-side processing feature adds this part of statement automatically when users trigger the sorting on the front-end, and having it in initial statement may cause the table to crash.
We've tried this on both our main site and staging site, and totals for any table never work.
We have tables with SQL data sources, and when we're designing or displaying the table, for a fraction of a second we sometimes see the correct totals, but then they quickly revert to 0 and stay at 0.
Do you have any suggestions on how to fix this?
Hello gfnewsitedev
These issues usually occur when using complex queries with multiple JOINS, or if the data in the table is not all integer or float, but instead string.
If you still cannot locate the issue, could you please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.
Best regards.
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
It's definitely the sum query being done by wpdatatables:
Unknown column 'total' in 'field list' for query
SELECT SUM(`total`) AS `total`, SUM(`sales`) AS `sales` FROM `3gf10_posts` ord
WHERE ord.post_type = 'shop_order' AND eventid.meta_value > 0
AND ord.post_date >= '2019-07-01' AND ord.post_date < '2019-07-18' GROUP BY eventid.meta_value
is there a filter available to mod the sum query before it's executed? I see a filter for the limit query, but couldn't find one for this query.
Hello again gfnewsitedev
You can take a look at available filters, and see if there's anything that could help you out there.
If you cannot get it to work, could you please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.
Best regards.
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
Hi again gfnewsitedev.
Sorry to hear that.
I'll wait for the login credentials, and tell you what I think when I log in.
Best regards.
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
Hi again Zubin.
What are the credentials to get past this screen?
Best regards.
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
Hi again Zubin.
I see all three tables are pulling meta values, using LEFT JOIN and GROUP BY functions, so that may be causing the issue here.
This is probably happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (rarely happens, 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″.
Please note some this when working with the server-side processing feature:
Best regards.
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
We'll try that. We had used Views for some other experiments with wpDataTables, so we'll try that again.
Thanks for your help!
You're welcome, Zubin.
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
Best regards.
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