Sauter la navigation

[Résolu] Multi Cred on the same do not work since last plugin update

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

Problem:

I have a site in which I have some Toolset forms placed in the same page,
What is also critical is that when page reload, all Cred forms are the same (the one that have been submitted !).

Solution:

In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2017, and test again

Relevant Documentation:

This support ticket is created Il y a 6 années et 2 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 20 réponses, a 2 voix.

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

Assisté par: Luo Yang.

Auteur
Publications
#1136928

Pat

Hello,

I have a site in which I have some Creds placed in the same page. These Creds are placed in the same page and everything was working fine until now.
With the last update I have made, I have an issue as after submitting the form, normally, I was redirected to the cart page. Now, I'm staying in the same page with something like /?_tt=1540915655
What is also critical is that when page reload, all Cred forms are the same (the one that have been submitted !).
At that time, if I submit again the form, then everything is fine.
If I place only one form in the page, everything is fine also.

That's a critical issue for me as I'm using this multi forms on all WC pages.

Let me know
Regards
Pat

#1137422

Dear Pat,

The problem is abnormal, please check these:
1) Check if there is any JS errors after you submit the form.
also check if there is any PHP errors occur in your website.

2) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2017, and test again

3) If the problem still persists, please provide database dump file(ZIP file) of your website, 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/

#1137535

Pat

Hi Luoy,

Thanks for taking care.
I have made some test and it seems the plugin Groups is causing the issue (even when everything is updated to the latest version.
As I had a task to move from Groups to Toolset Access, I thing I will do this move quickly.
Can you try from your side, to add the Groups plugin in one of your test sites and see if this is causing the same issue for you in this case?

Thanks
Regards
Pat

#1138010

I assume we are talking about the group plugin download from:
https://wordpress.org/plugins/groups/

This is a compatibility problem, please describe detail steps to duplicate the same problem, how do you setup the group plugin settings, how do you setup the post form? I need to test it in my localhost

#1138032

Pat

Hi Luoy,
Concerning the Groups plugin, there is no lots of parameters. I have checked all postypes to be used with and only administrator can define the Groups use.
Now, here is an example of how this is done on the page (postype = concours) where my Creds are :

[groups_member group="Membre"]

[wpv-conditional if="( $(wpcf-ic-boxes-existe-m) ne '' )"] <div class="untiers"><h3>Réservation de Boxes</h3>
<div class="descrip">[types field="ic-boxes-description"][/types]</div>
[cred_form form="commande-box"]</div>[/wpv-conditional]

[wpv-conditional if="( $(wpcf-ic-dress-existe-m) ne '' )"] <div class="untiers"><h3>Dressage</h3>
<div class="descrip">[types field="ic-dress-description"][/types]</div>
[cred_form form="inscription-dr"]</div>[/wpv-conditional]

[/groups_member]

And the "commande-box" Cred :
[credform class="cred-form cred-keep-original"]
Réserver un box pour le concours : [wpv-post-title]</br>

<div class="bloc">
<div class="cred-label">Choix du cheval :</div>

[cred_generic_field field='_wpcf_belongs_chevaux-concours_id' type='select' class='' urlparam='']
{
"required":1,
"validate_format":0,
"persist":1,
"default":[],
"options":[{"value":"","label":"Choisissez votre cheval"}, [wpv-view name="select-cheval-concours"] ]
}
[/cred_generic_field]

<div style="display:none;">
<div class="cred-label">Choix du concours :</div>

[cred_field field='_wpcf_belongs_concours_id' value='' order='date' ordering='desc' select_text='--- not set ---' value='[wpv-post-id]' class='form-control' output='bootstrap']

Quantité : </br>
[cred_field field='ic-quantite-box' post='inscriptions-box' value='' urlparam='' class='form-control' value='1' output='bootstrap']

<div class="cred-field cred-field-ma-tarifs-m">
<div class="cred-label">Tarifs membre</div>
[cred_field field="ic-boxes-choix-tarif-m" post="inscriptions-box" value='[types field="ic-boxes-choix-tarif-m" output="raw"]' urlparam=""]
</div>
</div></br>
[cred_field field="form_submit" value="Commander" urlparam=""]

[/credform]

And "Inscription-dr" Cred :
[credform class="cred-form cred-keep-original"]

Choisissez cette épreuve :
<div class="bloc">
[cred_field field="ic-dress-options" post="inscriptions-dr" value="" urlparam=""]
</div>

<div class="bloc">
<div class="cred-label">Choix du cheval :</div>
[cred_generic_field field='_wpcf_belongs_chevaux-concours_id' type='select' class='' urlparam='']
{
"required":1,
"validate_format":0,
"persist":1,
"default":[],
"options":[{"value":"","label":"Choisissez votre cheval"}, [wpv-view name="select-cheval-concours"] ]
}
[/cred_generic_field]
</div>
<div class="bloc">
<div class="cred-label">Choix du cavalier :</div>
[cred_generic_field field="_wpcf_belongs_cavaliers-concours_id" type="select" post="inscriptions-dr" class="" urlparam=""]
{
"required":1,
"validate_format":0,
"persist":1,
"default":[],
"options":[{"value":"","label":"Choisissez votre cavalier"}, [wpv-view name="select-cavalier-concours"] ]
}
[/cred_generic_field]
</div>

<div style="display:none;">
<div class="cred-label">Choix du concours :</div>

[cred_field field='_wpcf_belongs_concours_id' value='' order='date' ordering='desc' select_text='--- not set ---' value='[wpv-post-id]' class='form-control' output='bootstrap']

<div class="cred-field cred-field-dr-tarifs-m">
<div class="cred-label">Tarifs membre</div>
[cred_field field="ic-dress-choix-tarif-m" post="inscriptions-dr" value='[types field="ic-dress-choix-tarif-m" output="raw"]' urlparam=""]
</div>
</div></br>
[cred_field field="form_submit" value="Commander" urlparam=""]

[/credform]

Regards
Pat

#1138144

I can see there is only special custom shortcode [groups_member] in your codes, have you tried to remove it and test again?

And I think Acccess plugin should be able to replace the "Group" plugin.

I have tried the "groups" plugin in my localhost, it seems to be able to assign some specific Capabilities to the user group, there is similar feature within Access plugin, you can try this:
Dashboard-> Toolset-> Access control-> Custom role
click button "Enable advanced mode", then edit one of user role, there you can change the Capabilities for each user role.

And you can use Access shortcode [toolset_access] to do the similar thing as [groups_member], see our document:
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/

And Access plugin is full compatible with other Toolset plugins.

#1138164

Pat

Hi Luoy,

First, my objective is to move to Toolset access in the future, but I need to stay with Groups in the short time because this site cannot be modified until some weeks.
Concerning the [groups_member] shortcode, this is the way Groups plugin works. If you suppress it, you don't have the functionality any more !!!
For info, if I desactivate the Groups plugin, then, everything is working fine for the multi Creds.
Regards
Pat

#1138799

Since it is a compatibility problem, please provide a copy of your website, I need to test and debug it in my localhost, thanks

https://toolset.com/faq/provide-supporters-copy-site/

#1141609

Pat

Hi Luoy,

I'm coming back on this topic as after additional tests, it seems the issue is not related to a compatibility problem.

In fact, I have replaced Groups with Access.
I have also desactivated all other plugins than Toolset and Woocommerce and still have the issue.
The problem should be linked to a specific Cred form (Inscription box).
If I place this form alone in a page, that's fine.
If I place other forms with it in the same page, the other forms works well but the Inscription box does not work. Instead of moving to the cart page, the same page is reloaded with an additional url: /?_tt=1540915655
Can you tell me why Toolset is placing this /?_tt=1540915655 after submitting a form and what does this represent?

In addition, I have an error in the console :
Uncaught TypeError: $(...).wpvmap is not a function
at HTMLDocument.<anonymous> ((index):1448)
at i (jquery.js?ver=1.12.4:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
at Function.ready (jquery.js?ver=1.12.4:2)
at HTMLDocument.K (jquery.js?ver=1.12.4:2)

Regards
Pat

#1141923

The JS error is related to Toolset Map plugin, for the new question:

Can you tell me why Toolset is placing this /?_tt=1540915655 after submitting a form and what does this represent?

That is required for Toolset form submitting, it stores timestamp value of render the form.

As I mentioned above, please provide a copy of your website(if there isn't other compatibility problem, you can provide a database dump file 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/

#1141941

Pat

Hi Luoy,

I have desactivated the Toolset Maps plugin and still have the error in the console.
For info, I was previously using the Views integrated map and have moved from this solution to the Toolset map plugin. I'm not sure but that could be the start of the issue.

Is there anything to do as this is a big site and I would try to avoid making a duplication.
Regards
Pat

#1141961

I have searched it in our to-do list, there isn't similar report. If you don't need the legacy Views integrated map feature, please check this:
Dashboard-> Toolset-> Settings-> Maps
disable the option "Enable the legacy Views Map plugin", and test again.

As I mentioned above, if there isn't other compatibility problem, you can provide a database dump file only

#1141963

Pat

Hi Luoy,

I have already unchecked the old legacy map plugin and nothing changed.
I can send you a zip with all files (minus uploads) and database.
Please provide a private access for the next message and I will do.
Regards
Pat

#1141966

Private detail box is enabled.

Please point out the problem page URL and form URL, I need to test and debug it in my localhost, thanks

#1142021
sql-errors.JPG

I have tried to import your database dump file in my localhost, it is not valid andconducts a lots of mysql errors, see screenshot: sql-errors.JPG.

Please follow our document to make the database dump file, you can export the database dump file with duplicator plugin in "Database Only Mode", see their document:
lien caché

Then update your private message here:
https://toolset.com/forums/topic/multi-cred-on-the-same-do-not-work-since-last-plugin-update/#post-1141998