Skip Navigation

[Resolved] Plugin conflict with wpDataTables

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 11 replies, has 2 voices.

Last updated by marcialB 4 months, 1 week ago.

Assigned support staff: Nigel.

Author
Posts
#1558945

Hi there

A feature in Toolset causes an issue with wpDataTables. With Toolset activated, I can't edit settings in wpDataTables.

The console first shows this error: "Unchecked runtime.lastError: The message port closed before a response was received."

Then, after clicking a button within the wpDataTable backend, it adds: "Uncaught Error: no such method 'hide' for tooltip widget instance"

I saw some posts here in the forum regarding compatibility issues between Toolset and wpDataTables, but I don't think this issue was covered before.

Do you have an idea how to fix this?

Thanks for your help!

EDIT 1: The issue is caused by the "Layouts" Plugin, all others can keep running without interfering with wpDataTables. For the time being, I deactivated the layouts, but at some point, I'll need them back.
EDIT 2: I disabled loading bootstrap in wpDataTables for the backend, but it seems that's not the root of the problem.

#1559169

Update: The error "Unchecked runtime.lastError: The message port closed before a response was received." isn't related to Toolset. It's just the tooltips that cause problems.

#1559461

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Our internal compatibility site has nearly every available plugin for testing, but not wpDataTables.

I can ask the compatibility team to contact them for a test copy, though that may take a while, or you could share a zip file of the plugin here (via dropbox or similar, the link will be private) so that I can test with Layouts and confirm the issue before raising it with the developers.

#1559591

Hi Nigel
I can share a link to the ZIP file so you can investigate it.

#1559659

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Yes, please do.

Any link you share here is automatically private.

#1559673

Ah sorry, I thought it has to be one of those "private" messages 🙂

hidden link

#1560239

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Thanks. I installed the plugin on a clean test site and tested it with and without Layouts activated.

The only problem I found was the tooltips not working (screenshot of a working version with Layouts not active).

Hovering the question-mark icons produces the console error "Error: no such method 'hide' for tooltip widget instance", but the functionality of the page otherwise appears normal.

Are you seeing something more than this?

I won't escalate this if it is just the tooltips not working, as realistically I doubt it will ever be prioritised.

If there is something more serious, let me know and I can try and reproduce it if you have the required steps.

#1560357

Hi Nigel
With layouts activated I can't use the buttons marked in the screenshot. They are needed to add new columns to the table. I don't think there is another option to achive that. Therefore I need those buttons.
If your devs can fix it, I would be more than happy. But I understand that this is a very rare occasion and might be too complicated to fix. In that case I'll have to disable layouts when working in the backend and reactivate it when done.

Just one final idea: is there a code I can add to my functions.php that disables the toolset scripts on URLs like this: wp-admin/admin.php?page=wpdatatables-constructor&source&table_id=... ?
Thanks!

#1562329

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I had the time just now to set up a sample table with the plugin to be able to reproduce the issue you show in that screenshot, and now I'm passing my test site on to the second tier so that the precise cause can be determined.

When I have some news I'll share it with you.

#1563801

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

My colleague identified a script conflict between Layouts and the plugin, and has escalated this to the developers to be more restrictive about where we enqueue our assets (i.e. not on the admin pages of other plugins).

In the meantime you could add the following code snippet (at Toolset > Settings > Custom Code, to run on the backend) to dequeue the problem script on pages where it is not needed:

function fix_compat($hook_suffix){
	if ($hook_suffix != 'post-new.php' || $hook_suffix != 'post.php') {//maybe you need to amend this but as far I tested, it all works when done under these conditions.
		wp_dequeue_script( 'jquery-ui-tooltip' );//dequeue the culprit script.
	}
}
add_action('admin_enqueue_scripts', 'fix_compat', 999);

I'll leave this escalated so that I can let you know as and when a fix is included in Layouts (so that you can remove this snippet).

#1569161

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Just to let you know that this has been fixed by the developers, and the fix will be included in the next version of Layouts (2.6.4) which is currently undergoing testing, and which is planned for release next Monday.

Once updated you will be able to remove the code snippet used for the workaround.

#1569177

Hi Nigel
That's great to hear. Thanks to you and the devs for taking care of this so quickly!