Skip Navigation

[Resolved] autogenerate form not working

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

Problem:

Use CRED form button "autogenerate form", and get JS errors:

cred.js?ver=1.9.6.1:322 Uncaught TypeError: CodeMirror.fromTextArea is not a function
at a.fn.init.<anonymous> (cred.js?ver=1.9.6.1:322)

Solution:

Deactivate other plugins and switch to wordpress default theme, and test again.

The client has fixed it by deactivating plugin "WP Hide Post"

Relevant Documentation:

This support ticket is created 6 years, 6 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 6 replies, has 2 voices.

Last updated by malagaS 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#902251

I am trying to: autogenerate form

Link to a page where the issue can be seen:

I expected to see: inserted form

Instead, I got: chrome inspect shows:
cred.js?ver=1.9.6.1:322 Uncaught TypeError: CodeMirror.fromTextArea is not a function
at a.fn.init.<anonymous> (cred.js?ver=1.9.6.1:322)
at Object.swapEl (utils.js?ver=1.9.6.1:284)
at Object.enableExtraCodeMirror (cred.js?ver=1.9.6.1:321)
at Object.forms (cred.js?ver=1.9.6.1:2560)
at HTMLDocument.<anonymous> (post.php?post=59068&action=edit:2854)
at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:2)
at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:2)
at Function.ready (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:2)
at HTMLDocument.K (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:2)
(anonymous) @ cred.js?ver=1.9.6.1:322
swapEl @ utils.js?ver=1.9.6.1:284
enableExtraCodeMirror @ cred.js?ver=1.9.6.1:321
forms @ cred.js?ver=1.9.6.1:2560
(anonymous) @ post.php?post=59068&action=edit:2854
i @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:2
fireWith @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:2
ready @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:2
K @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:2
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:179 Uncaught TypeError: Cannot read property 'bs_component_show_hide_button' of undefined
at QTags.i.getButton (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:179)
at ToolsetCommon.BootstrapCssComponentsQuickTags.self.add_bootstrap_components_buttons (toolset-bs-component-buttons.js?ver=4.9.6:108)
at toolset-bs-component-buttons.js?ver=4.9.6:21
at d (toolset-event-manager.min.js?ver=1.0:1)
at Object.j [as doAction] (toolset-event-manager.min.js?ver=1.0:1)
at HTMLDivElement.<anonymous> (toolset-bs-component-events.js?ver=1:213)
at Function.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:2)
at toolset-bs-component-events.js?ver=1:209
at load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load[]=i-tabs,suggest,jquery-color,jquery-ui-position,wp-a11y,underscore,jquery-ui-resizable,jquery-ui-button,jquery-ui-dialog,backbone&load[]=,jquery-effects-core,jquery-effects-size,jquery-effects-scale,wp-pointer,quicktags,wplink,shortcode,wp-util,moxiejs,plupload&ver=4.9.6:98

#902252

also unable to change Status of content created or edited by this form: to publish - after saving it still shows draft.

#902285

Hello,

The problem you mentioned above is abnormal, in case it is a compatibility problem, please try this:

1) deactivate other plugins and switch to wordpress default theme, and test again

2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, also point out the problem page URL, I need to test and debug it in my localhost, thanks

#902345
auto.JPG

Thanks for the details, I have tried the database dump file you provided in my localhost, there isn't similar problem, see screenshot: auto.JPG

So it should be a compatibility problem or server problem, you can migrate your website in a test site
https://toolset.com/faq/how-do-i-migrate-a-wordpress-site-from-one-domain-to-the-other/

then deactivate plugins/theme and test again, try to locate the problem plugin/theme.

#902581

thank you - it turns out to be this plugin:
https://wordpress.org/plugins/wp-hide-post/

support for the plugin looks non-responsive so won't pursue that.
if there is nothing that can be done on the Toolset side the ticket can be closed.
thanks!

#902664

I have tried the plugin "WP Hide Post" with your database dump file, but there isn't similar problem, and I see some other PHP warning message after activate plugin "WP Hide Post":
for example:

wp-hide-post\wp-hide-post.php): failed to open stream: No such file or directory in \wp-includes\functions.php on line 4835
Warning: fread() expects parameter 1 to be resource, boolean given in \wp-includes\functions.php on line 4838
Warning: fclose() expects parameter 1 to be resource, boolean given in \wp-includes\functions.php on line 4841

Those warning message are produced by the plugin "WP Hide Post", with or without CRED plugin activated.

It seems that the plugin "WP Hide Post" is not compatible with the latest version of WordPress, I suggest you check it with author of plugin "WP Hide Post", and you are right, nothing that can be done on the Toolset side.

You can create new thread if you need other assistance.

#902673

thanks Luo, it solves my problem to disable the plugin on the live site.