Sauter la navigation

[Résolu] How to insert a user modify form ?

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

In French WordPress, setup an user view, try to insert edit user form shortcode into view’s loop using UI, it will produce JS errors:
Uncaught SyntaxError: Unexpected identifier

Solution:

This issue is fixed in Toolset Form plugin version 2.4

Relevant Documentation:

This support ticket is created Il y a 5 années et 8 mois. 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)

Marqué : 

Ce sujet contient 9 réponses, a 2 voix.

Dernière mise à jour par Pat Il y a 5 années et 6 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1244424

Pat

Hello,

I have a site with users and I want to afford ability to manage all user information in the front end.
So, I created a form to modify user and populated the content.
Now, I'm trying to integrate it inside a Views (the Views that displays all user info), but when I want to add it (thanks to the Form button), I can chose the form I have created for that but then, nothing is added (I have the loading image that is running and no shortcode is added).

Can you tell me how I can insert this Cred shortcode?
Regards
Pat

#1244468

Dear Pat,

The problem you mentioned above is abnormal:
I can chose the form I have created for that but then, nothing is added

I have tested it in my localhost with a fresh wordpress installation + the latest version of Toolset plugins, it works fine.
I can insert the form shortcode without any problem.

I suggest you check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, deactivate all custom PHP/JS code snippets

3) Clear your browser cache and test again

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

#1244544

Pat

Hi Luo,

You're right, I'm getting an error when trying to integrate this shortcode.
Here is what I have inthe console :

Uncaught SyntaxError: Unexpected identifier
at new Function (<anonymous>)
at Function.s.template (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags,wp-a11y,wplink,suggest,shortcode,wp-util,jquery-ui-tooltip,moxiejs,pluploa&load[]=d&ver=5.2:10)
at Object.cred_user_form (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags,wp-a11y,wplink,suggest,shortcode,wp-util,jquery-ui-tooltip,moxiejs,pluploa&load[]=d&ver=5.2:172)
at Toolset.CRED.shortcodeManager.self.shortcodeDialogOpen (cred_shortcode.js?ver=3.4:1135)
at HTMLButtonElement.onclick (admin.php?page=views-editor&view_id=1022:8718)

I'm with the latest Toolset versions and have desactivated all other plugins than Toolset and WC.
My theme is Divi, but I have also tested it with Twenty19 with the same issue.

Regards
Pat

#1244559

Please provide your website database dump file in below private message box, I will debug it in tomorrow morning, thanks

#1244908

Thanks for the details, I can duplicate the same problem in my localhost with your database, it seems to be a translation problem of Toolset Forms plugin, I have escalated this issue, will update here if there is any news.

currently you can try these:
1) Login into your website, edit your profile, option "Language" choose "English (United States)", then test again
2) And in your case, I suggest you pass user's ID to the form shortcode, like this:

[cred_user_form form='backoffice-modification-profil-adherent' user='[wpv-user field="ID"]']
#1244920

Pat

Hi Luo,

Many thanks for your support. You're right, switching to EN language makes the Forms shortcode available again!

I have another issue now, I have used this code to insert a link to access the page where the Form modification is (integrated in the Views that display a user profile) :
[toolset-edit-user-link content_template_slug="aaa"]Modifier[/toolset-edit-user-link]

In the aaa page, I have inserted :
[cred_user_form form='backoffice-modification-profil-adherent' user='[wpv-user field="ID"]']

But the link is not displayed in the Views.
Did I miss something?

Regards
Pat

Les nouveaux fils créés par Luo Yang et associés à celui-ci sont repris ci-dessous :

https://toolset.com/fr/forums/topic/insert-edit-user-form-link/

#1244922

Dear Pat,

For new question, please check the new thread here:
https://toolset.com/forums/topic/insert-edit-user-form-link/

#1245560

Here is the update:
This issue will be fixed in both Toolset Form plugin version 2.4 beta1 2.4 (Stable), it is in QA status, will be released soon.

Here is errata link:
https://toolset.com/errata/impossible-to-insert-edit-user-forms-into-text-editors-if-wordpress-is-set-to-french/

#1278155

Toolset Forms plugin version 2.4 is released, you can download it here:
https://toolset.com/account/downloads/

please test it and feedback if the problem is fixed, thanks

#1280131

Pat

Hi Luo,

Just test it and it seems to work fine now.
Thanks for the info.
Regards
Pat