I created a simple wpDataTable with just one string column and insert a new entry with a '%' sign. After successful insert into the Mysql database a value similar to this {a71791b8f65f7936b7efe169b881fbe0a77c142bda67b0d1c55351f7538cf15d} is store into the database. If I enter a '%' direct e.g. via phpadmin the correct char '%' is stored. So it's not a problem with the database, collation or charset. I used utf8 and utf8mb4 as charset for the database as also utf8_general_ci and utf8mb4_general_ci for the collation. I using wpDataTable 2.5 on Wordpress 5.1 with PHP 7.3.2 and MySQL 5.7.14.
I am sorry, but I couldn't replicate the issue on my end. Here's the table entry:
And here's the PHPMyAdmin:
It added it without any issues.
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.
Also, if at all possible, could you provide the PHPMyAdmin credentials as well, so I can take a look?
in the meantime I found a way to reproduce the error with a fresh installation. (First I thought it could be related with the OS, locale, collation, PHP setting... nope)
1) create a wpDataTable and put a text/string with a "%" sign in - this works for both of us. Fine!
2) now create a seperate Database connection (in my case same server, same user, same password, just another database name with charset utf8 and utf8_general_ci like the wp_datatables) and set this as the default connection; then (like in step 1) create a wpDataTable and put a text/string with a "%" sign in - at this time the error occurs.
Can you reproduce it the same way? It very urgent for us, because everytime all "%" sign will be replaced in the row even if you just update a specific field without a "%" in (e.g. the price) - so this happend mainly unnoticed before.
I tried it in wpDataTables 2.3.2; 2.4 and 2.5 and the issue is there. I'll forward this to one of our developers, and get back to you as soon as I have some answers about this.
Turns out that PHP Parser is handling the regular connection, and that we've added a security measure when it comes to a separate DB connection.
Can you, please try this temporary solution? Open ../wp-content/plugins/wpdatatables/source/class.wdttools.php and around line 852 find this line of code:
if ($isMySql) {
$string = $wpdb->_real_escape($string);
}
And comment that. It should prevent the plugin from adding that {64-character random code} and display the % sign.
Thank you for pointing this one out to us. We will definitely be working on resolving this issue in one of the future updates.
Thanks a lot - this temporary solutions works for me!
Just letting you know that in the meantime I thought it could be a good solution to move our datatables into the main wordpress mysql database. But then the replacement (% -> {64-character random code}) also occurs. This means it isn't a "seperate DB connection" problem only.
I created a simple wpDataTable with just one string column and insert a new entry with a '%' sign. After successful insert into the Mysql database a value similar to this {a71791b8f65f7936b7efe169b881fbe0a77c142bda67b0d1c55351f7538cf15d} is store into the database. If I enter a '%' direct e.g. via phpadmin the correct char '%' is stored. So it's not a problem with the database, collation or charset. I used utf8 and utf8mb4 as charset for the database as also utf8_general_ci and utf8mb4_general_ci for the collation. I using wpDataTable 2.5 on Wordpress 5.1 with PHP 7.3.2 and MySQL 5.7.14.
Hello Fabian.
Thank you for your purchase.
I am sorry, but I couldn't replicate the issue on my end. Here's the table entry:
And here's the PHPMyAdmin:
It added it without any issues.
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.
Also, if at all possible, could you provide the PHPMyAdmin credentials as well, so I can take a look?
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 Aleksandar,
in the meantime I found a way to reproduce the error with a fresh installation. (First I thought it could be related with the OS, locale, collation, PHP setting... nope)
1) create a wpDataTable and put a text/string with a "%" sign in - this works for both of us. Fine!
2) now create a seperate Database connection (in my case same server, same user, same password, just another database name with charset utf8 and utf8_general_ci like the wp_datatables) and set this as the default connection; then (like in step 1) create a wpDataTable and put a text/string with a "%" sign in - at this time the error occurs.
Can you reproduce it the same way? It very urgent for us, because everytime all "%" sign will be replaced in the row even if you just update a specific field without a "%" in (e.g. the price) - so this happend mainly unnoticed before.
Kind regards
Fabian
Hi Fabian.
You're absolutely right.
I tried it in wpDataTables 2.3.2; 2.4 and 2.5 and the issue is there. I'll forward this to one of our developers, and get back to you as soon as I have some answers about this.
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
Hello again Fabian.
Turns out that PHP Parser is handling the regular connection, and that we've added a security measure when it comes to a separate DB connection.
Can you, please try this temporary solution? Open ../wp-content/plugins/wpdatatables/source/class.wdttools.php and around line 852 find this line of code:
And comment that. It should prevent the plugin from adding that {64-character random code} and display the % sign.
Thank you for pointing this one out to us. We will definitely be working on resolving this issue in one of the future updates.
Please let me know if this works.
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
Thanks a lot - this temporary solutions works for me!
Just letting you know that in the meantime I thought it could be a good solution to move our datatables into the main wordpress mysql database. But then the replacement (% -> {64-character random code}) also occurs. This means it isn't a "seperate DB connection" problem only.
Kind reagards
Thanks for letting me know, Fabian.
You are welcome. Glad I could help.
I forwarded the issue to our developers, and they are looking into it for some of our future updates.
If you have any more issues or questions 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!
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