We are using wpDataTables in a multisite environment on one of its systems. On this system we are full administrators. When we try to store HTML in the transform tab, it gets filtered out and only the placeholders are left. We asked the multisite superadmins to save the HTML for us and it was successful. When we (as local system administrators) looked at the table setup, the HTML was stripped out again. We canceled out to leave the HTML stored by the superadmins. Then we created a new page with the wpDataTables shortcode and the table showed up correctly with the HTML.
Why can't a local administrator in a WordPress multisite environment not save HTML in the transform field?
I am checking about this with our Developers, not 100% sure if this might be a permissions issue on your multiSite, or if it could be a bug/ or current default behaviour for how our Plugin handles the custom HTML in the Transform Value.
As far as I am aware, if we use a 'standard Admin account', it should be able to write the custom HTML in Transform Value and we can't reproduce it, but as soon as our devs advise, we will report back.
In the meantime, to save some time, you could send us remote access if possible; so if needed, we can also take a look remotely at your setup.
Please provide me a temporary WP-admin (administrator) user for your website where this happens,
as well as FTP credentials and access to the database ( either link with credentials for PHPmyAdmin, or access to Hosting Panel),
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 parties.
You can write credentials here just check PRIVATE Reply so nobody can see them except us.
That being said, in order to properly see this issue, I suppose the best is if you can send us two separate Admin accounts to log in :
- One Administrator account as a 'local Admin role' as you described, so we can test how the Custom HTML gets 'cleaned' via Transform Value - we can make a new dummy/Test Table on your Site
- And one SuperAdmin account - so that we can compare the behaviour, etc.
Let me know if that sounds OK and if possible send us the full remote access;
In the meantime, if our devs already know what this could be, I will certainly advise you on it right away when they reply.
I researched about this online and seems we isolated what the issue could be on your multi-Site environment for the 'standard Admin users' compared to Super Admins.
It seems from looking at some other Posts online that this is a security feature/or rather issue in your case, that on sub-sites, WordPress might be disabling the unfiltered_html capability on certain user roles.
This would explain why it 'strips certain HTML' when these users try to edit.
Please check out this Post from StackOverflow, where it seems another user had a very similar issue and they were advised how to solve it.
This seems to be the crucial part :
"What you're having an issue with is the unfiltered_html capability. If you read that codex link you'll notice the following:
Note: In WordPress Multisite, only Super Admins have the unfiltered_html capability.
To get around this you'll need to add the unfiltered_html capability to the administrator role".
I hope that helps.
Our Support is unable to cover configurations or issues from the Hosting server, but I hope that this advice helps you to isolate and fix this capability - let me know if that resolves the issue.
I was able to save and retrieve the transform HTML in the wpDataTables admin on multisite as a local administrator after adding this code snippet to the theme's functions.php:
function add_unfiltered_html_capability_to_administrator($caps, $cap, $user_id) { if ('unfiltered_html' === $cap && user_can( $user_id, 'administrator')) { $caps = ['unfiltered_html']; }
Thank you very much for sharing that solution with us.
This will be very valuable for other users who might experience the same issue with Transform Value on multisite environments so we will make a note of it;
if they come across this ticket, they can also see it since it's public.
I am delighted to see you managed to resolve this.
If anything new comes up, please don't hesitate to open new tickets.
We are using wpDataTables in a multisite environment on one of its systems. On this system we are full administrators. When we try to store HTML in the transform tab, it gets filtered out and only the placeholders are left.
We asked the multisite superadmins to save the HTML for us and it was successful. When we (as local system administrators) looked at the table setup, the HTML was stripped out again. We canceled out to leave the HTML stored by the superadmins.
Then we created a new page with the wpDataTables shortcode and the table showed up correctly with the HTML.
Why can't a local administrator in a WordPress multisite environment not save HTML in the transform field?
Hello,
I am checking about this with our Developers, not 100% sure if this might be a permissions issue on your multiSite, or if it could be a bug/ or current default behaviour for how our Plugin handles the custom HTML in the Transform Value.
As far as I am aware, if we use a 'standard Admin account', it should be able to write the custom HTML in Transform Value and we can't reproduce it, but as soon as our devs advise, we will report back.
In the meantime, to save some time, you could send us remote access if possible; so if needed, we can also take a look remotely at your setup.
Please provide me a temporary WP-admin (administrator) user for your website where this happens,
as well as FTP credentials and access to the database ( either link with credentials for PHPmyAdmin, or access to Hosting Panel),
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 parties.
You can write credentials here just check PRIVATE Reply so nobody can see them except us.
That being said, in order to properly see this issue, I suppose the best is if you can send us two separate Admin accounts to log in :
- One Administrator account as a 'local Admin role' as you described, so we can test how the Custom HTML gets 'cleaned' via Transform Value - we can make a new dummy/Test Table on your Site
- And one SuperAdmin account - so that we can compare the behaviour, etc.
Let me know if that sounds OK and if possible send us the full remote access;
In the meantime, if our devs already know what this could be, I will certainly advise you on it right away when they reply.
Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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,
I researched about this online and seems we isolated what the issue could be on your multi-Site environment for the 'standard Admin users' compared to Super Admins.
It seems from looking at some other Posts online that this is a security feature/or rather issue in your case, that on sub-sites, WordPress might be disabling the unfiltered_html capability on certain user roles.
This would explain why it 'strips certain HTML' when these users try to edit.
Please check out this Post from StackOverflow, where it seems another user had a very similar issue and they were advised how to solve it.
This seems to be the crucial part :
"What you're having an issue with is the unfiltered_html capability. If you read that codex link you'll notice the following:
Note: In WordPress Multisite, only Super Admins have the unfiltered_html capability.To get around this you'll need to add the unfiltered_html capability to the administrator role".
I hope that helps.
Our Support is unable to cover configurations or issues from the Hosting server, but I hope that this advice helps you to isolate and fix this capability - let me know if that resolves the issue.
Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
I was able to save and retrieve the transform HTML in the wpDataTables admin on multisite as a local administrator after adding this code snippet to the theme's functions.php:
function add_unfiltered_html_capability_to_administrator($caps, $cap, $user_id) {
if ('unfiltered_html' === $cap && user_can( $user_id, 'administrator')) {
$caps = ['unfiltered_html'];
}
return $caps;
}
add_filter('map_meta_cap', 'add_unfiltered_html_capability_to_administrator', 1, 3);
Hello,
Thank you very much for sharing that solution with us.
This will be very valuable for other users who might experience the same issue with Transform Value on multisite environments so we will make a note of it;
if they come across this ticket, they can also see it since it's public.
I am delighted to see you managed to resolve this.
If anything new comes up, please don't hesitate to open new tickets.
Thanks again.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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