Holiday Notice – Support Unavailable on April 18 and April 21
We just wanted to let you know that our support team will be offline on Friday, April 18th (Good Friday) and Monday, April 21st (Easter Monday) due to the holidays.
We'll be back on Tuesday, ready to assist you!
In the meantime, if you need any help, feel free to:
-
Use the support widget in the bottom right corner on our websites (Amelia and wpDataTables) — our latest AI-powered assistant is there 24/7 to help with basic and intermediate questions,
-
Browse our detailed documentation (Amelia, wpDataTables)
-
Explore helpful articles,
-
Or check out our YouTube channels for video guides!
Amelia YouTube Channel
wpDataTables YouTube Channel
Thank you for your understanding, and we wish you a wonderful holiday weekend!
Hi All
I've been using the Serialized PHP Array option and it is working well. I recently needed to get access to the WP API so used the include "wp-load" statement in my PHP file. As soon as I do I get the "Table in data source has no rows" error.
The php file works via the browser and outputs the array correctly.
To debug I've tried making a static php array with just one row and a couple of columns. Executing via the browser with and without the wp-load statement outputs the array correctly.
If I comment out the wp-load I can import the table but as soon as I uncomment I get the "no rows" error.
I've even tried passing WP User ID a PHP Session variable and via a cookie. Both execute correctly in the browser but produce the no rows error in wpdatatables.
I have a second WP test site with just wpdatatables, Elementor pro and Gravity Forms and the php file loads correctly with the wp-load statement! So it is definitely a conflict with somerthing on my main site.
I tried disabling all plugins on the main site, removing functions.php and changing the theme but still get the error.
I have used the Query Monitor plugin to see what errors generate when I try to import the table. It produces a the following PHP error:
wp-content/plugins/wpdatatables/source/class.wpdatatable.php:2442at location:
Does anyone have any suggestions as to what to do next?
thanks in advance.
Jeff
Forgot to mention that with the wp-load statement I tried relative and absolute paths as well as creating a test php file in the same folder as wp-load.php and using no path.
Hi Entrust_ICT,
Thank you for your purchase.
Can you please provide me a link of that script so I can debug it in our local environment and see what cause the issue?
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
It's basically just a line in functions.php (to store a session variable) and a few lines in the Serialized PHP to retrieve the session variable. (I don't think the wp-load method to get the current WP user will work as the Serialized script seems to run in a different context / namespace as the normal user).
So in functions.php I have:
$_SESSION["Test"] = "green";
And in the Serialized PHP I have
$var1 = $_SESSION["Test"];
$Test_Array[] = array( 'Col1' => 1, 'Col2'' => $var1,);
echo serialize ($Test_Array);
I think again - because the wpdatatable function is running in a different context - it can't see that session variable.
If I provide a Session Name in functions.php e.g.
session_id("Test_Session");
session_start();
$_SESSION["Test"] = "green";
and then in the Serialized PHP
session_id("Test_Session");
session_start();
$var1 = $_SESSION["Test"];
that actually works and I can see $var1 in the column. But that method means every user visiting the site sees the same session so it's very insecure.
I saw in an older ticket that you were looking at having Placeholder variables for Serialized PHPs in v 2.1.
Any update on that? As then I could just use %CURRENT_USER_ID%
thanks
Hi Entrust_ICT,
You can take a look with some solution on this ticket.
Placeholders works with other table types (JSON, XML, PHP array) from version 2.2. You can check our changelog in our documentation.
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
That pretty much solved all my problems. Thank you.
Sorry, quick question. What is the syntax for accessing the placeholder in PHP?
Hi Milan
I can't access that ticket link you sent previously (in case the syntax is there). It just bounces back to my tickets.
Hi Entrust_ICT,
Sorry about that, am not sure what happens.
Here you go https://tmsplugins.ticksy.com//ticket/1512255
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