Skip Navigation

[Resolved] Javascript error when trying to upload an image

This thread is resolved. Here is a description of the problem and solution.

Problem:

I am trying to: upload an image using the image field in a Toolset Form

Instead, I got some JS errors.

Solution:

It seems to be a compatibility issue, please try these:

https://toolset.com/forums/topic/javascript-error-when-trying-to-upload-an-image/#post-1854389

Relevant Documentation:

This support ticket is created 3 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by Darryl 3 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1854263

I am trying to: upload an image using the image field in a Toolset Form

Instead, I got:

toolset-media-field.prototype.js:289 Uncaught TypeError: _.contains is not a function
at Toolset.CRED.MediaField.Toolset.Common.MediaField.manageInputSelectorClick (toolset-media-field.prototype.js:289)
at HTMLInputElement.<anonymous> (toolset-media-field.prototype.js:84)
at HTMLDocument.dispatch (jquery.js:3)
at HTMLDocument.r.handle (jquery.js:3)
Toolset.Common.MediaField.manageInputSelectorClick @ toolset-media-field.prototype.js:289
(anonymous) @ toolset-media-field.prototype.js:84
dispatch @ jquery.js:3
r.handle @ jquery.js:3

#1854389

Hello,

It seems to be a compatibility issue, please try these:
1) deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again

2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

3) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL and form URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1859503

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.