SELECT p.ID, pm1.meta_value AS SORTID, pm2.meta_value AS NAME, pm3.meta_value AS URL FROM wp_term_relationships t INNER JOIN wp_posts p ON t.object_id = p.ID LEFT JOIN wp_postmeta pm1 ON (pm1.post_id = p.ID AND pm1.meta_key = 'place_sortid') LEFT JOIN wp_postmeta pm2 ON (pm2.post_id = p.ID AND pm2.meta_key = 'place_name') LEFT JOIN wp_postmeta pm3 ON (pm3.post_id = p.ID AND pm3.meta_key = 'place_url') WHERE p.post_type = 'post' AND p.post_status = 'publish' AND t.term_taxonomy_id = '5'
The query being sent to MySQL...
SELECT p.ID, pm1.meta_value AS SORTID, pm2.meta_value AS NAME, pm3.meta_value AS URL
FROM wp_term_relationships t INNER JOIN wp_posts p ON t.object_id = p.ID LEFT JOIN wp_postmeta pm1 ON (pm1.post_id = p.ID AND pm1.meta_key = 'place_sortid') LEFT JOIN wp_postmeta pm2 ON (pm2.post_id = p.ID AND pm2.meta_key = 'place_name') LEFT JOIN wp_postmeta pm3 ON (pm3.post_id = p.ID AND pm3.meta_key = 'place_url') WHERE p.post_type = 'post' AND p.post_status = 'publish' AND t.term_taxonomy_id = '5' LIMIT -1
There's an issue with the latest version and it will be fixed with the next minor update as soon as our developers resolve the issue.
At the moment, you can revert to v4.0.1 or temporarily disable server-side processing and add
LIMIT 2000
so the query returns only the initial 2.000 rows. Let me know if that helps or if you need me to send you the previous version of wpDataTables until this is resolved.
Thank you for the quick reply, Aleksandar. Without knowing when the next update will be released, I would appreciate if can you send v4.0.1, or at least the affected file(s), at your earliest convenience. I'd like to get it resolved ASAP.
I'm getting a database error because LIMIT -1 is being appended to my SQL query...
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-1' at line 1
Here are the files reported reported by WP Query Monitor...
media/plugins/wpdatatables/source/class.wpdatatable.php:2548
media/plugins/wpdatatables/source/class.wpdatatable.php:3266
media/plugins/wpdatatables/controllers/wdt_functions.php:693
wp-includes/shortcodes.php:356
wp-includes/shortcodes.php:356
wp-includes/shortcodes.php:228
The original query...
SELECT p.ID, pm1.meta_value AS SORTID, pm2.meta_value AS NAME, pm3.meta_value AS URL
FROM wp_term_relationships t
INNER JOIN wp_posts p
ON t.object_id = p.ID
LEFT JOIN wp_postmeta pm1
ON (pm1.post_id = p.ID
AND pm1.meta_key = 'place_sortid')
LEFT JOIN wp_postmeta pm2
ON (pm2.post_id = p.ID
AND pm2.meta_key = 'place_name')
LEFT JOIN wp_postmeta pm3
ON (pm3.post_id = p.ID
AND pm3.meta_key = 'place_url')
WHERE p.post_type = 'post'
AND p.post_status = 'publish'
AND t.term_taxonomy_id = '5'
The query being sent to MySQL...
SELECT p.ID, pm1.meta_value AS SORTID, pm2.meta_value AS NAME, pm3.meta_value AS URL
FROM wp_term_relationships t
INNER JOIN wp_posts p
ON t.object_id = p.ID
LEFT JOIN wp_postmeta pm1
ON (pm1.post_id = p.ID
AND pm1.meta_key = 'place_sortid')
LEFT JOIN wp_postmeta pm2
ON (pm2.post_id = p.ID
AND pm2.meta_key = 'place_name')
LEFT JOIN wp_postmeta pm3
ON (pm3.post_id = p.ID
AND pm3.meta_key = 'place_url')
WHERE p.post_type = 'post'
AND p.post_status = 'publish'
AND t.term_taxonomy_id = '5'
LIMIT -1
How can this be fixed?
Hey Ryan.
Sorry for the inconvenience.
There's an issue with the latest version and it will be fixed with the next minor update as soon as our developers resolve the issue.
At the moment, you can revert to v4.0.1 or temporarily disable server-side processing and add
LIMIT 2000
so the query returns only the initial 2.000 rows. Let me know if that helps or if you need me to send you the previous version of wpDataTables until this is resolved.
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
Thank you for the quick reply, Aleksandar. Without knowing when the next update will be released, I would appreciate if can you send v4.0.1, or at least the affected file(s), at your earliest convenience. I'd like to get it resolved ASAP.
Received, thank you Aleksandar.
You're welcome, Ryan.
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
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