Skip Navigation

[Résolu] Cred interferes with Gravity Forms

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.

Marqué : 

This topic contains 16 réponses, has 2 voix.

Last updated by Noman Il y a 4 années et 1 mois.

Assigned support staff: Noman.

Auteur
Publications
#509460
cred in gravity forms.png

I am trying to: Install a Gravity Form in a site where Cred is also installed

I visited this URL: the settings page of a Gravity form

I expected to see: the normal settings page

Instead, I got: the settings page cluttered with Cred related information

See the attached screenshot.

#509659

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Erik,

Thank you for getting in touch with us.

Can you please share your Debug Information with us so we can see it? I have enabled debug info box for your next reply:
https://toolset.com/faq/provide-debug-information-faster-support/

Looking forward to help you.
Thank you

#512965

Hi Noman, debug information added.

#512974

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Erik,

Thank you for providing debug information.

Can you please tell us which Gravity Form version you are using, so that we will test it on our local site?

Thank you

#513029

Hi Noman,

Using Gravity Forms version 2.2.1.2.

I just checked my Gravity Form acount and saw there is a new intermediate update 2.2.1.5.
Will install that and see if it solves this.

Erik

#513036

Just installed Gravity Forms 2.2.1.5. (latest version) and I can confirm the bug is still present.

#513106

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Erik,

I have tested this in my fresh WP site and I am not able to reproduce this issue. Can you please try to add following code in your theme’s functions.php file and check if it resolves the problem?

/**
* Remove Toolset buttons on front-end editors
* which appear for role author+ when insert
* media option set on CRED forms
*
* The filters work globally, so you will need
* to add a test, e.g. for the page where the
* CRED form is added
*/
function remove_toolset_buttons(){

// $post not available with init hook
$postID = url_to_postid( $_SERVER['REQUEST_URI'] , '_wpg_def_keyword', true );

// remove the Fields and Views button
add_filter( 'toolset_editor_add_form_buttons', '__return_false' );

// remove the CRED button
add_filter( 'toolset_cred_button_before_print', '__return_false' );

// remove the Access button for certain roles
add_filter( 'toolset_editor_add_access_button', function(){

$roles = array( 'author' );
return $roles;
} );
}
add_action( 'init', 'remove_toolset_buttons' );

Thank you

#513186

Hi Noman,

I've tested this in a fresh WP install too and I can reproduce it.

Before I try your code on a site I am developing for a customer I would like you to try again to reproduce the error.

I can give you administrator access to the fresh site where I reproduced the error. Perhaps this will help you to reproduce the error on your server or debug it.

Erik

#513311

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Erik ,

I have again tried to reproduce this issue at my end with Twenty Sixteen theme and ALL Toolset plugins and Gravity form plugin activated, but still not able to reproduce this issue.

Can you please try to check it by deactivating all third-party plugins (except Toolset and Gravity) and switching back to the Default Theme (e.g. Twenty Sixteen theme) to see for any possible conflicts with any of the plugins or themes?

Yes, sure you can send us temporary access (WP-Admin) to your site
– preferably to a test site where the problem has been replicated if possible –
in order to be of better help and check if some configurations might need to be changed.

Your next answer will be private which means only you and I have access to it.

=== Please backup your database and website ===

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

Looking forward to help you.
Thank you

#513433

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Erik,

Thank you for providing login details. Yes, I can see the issue in your site.

I have escalated this issue to our 2nd tier support for further review and we will get back to you with an update.

Thank you for your co-operation and patience as we strive hard to resolve this.

#514112

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Erik,

Just wanted to send you some update and temporary solution. After confirmation of our 2nd tier support I have reported this to our development team. In the meantime you can safely use the following code which will solve the issue by removing CRED options from Gravity Forms. I have tested this code in your Test site and it worked great. Currently I have removed this from test site so that our development team can see the issue:

/**
* Remove Toolset buttons on front-end editors
* which appear for role author+ when insert
* media option set on CRED forms
*
* The filters work globally, so you will need
* to add a test, e.g. for the page where the
* CRED form is added
*/
function remove_toolset_buttons(){
 
// $post not available with init hook
$postID = url_to_postid( $_SERVER['REQUEST_URI'] , '_wpg_def_keyword', true );

if( isset($_GET['page']) && $_GET['page'] == 'gf_edit_forms' ) { // if condition for Gravity Forms, edit with your own condition 
// remove the Fields and Views button
add_filter( 'toolset_editor_add_form_buttons', '__return_false' );
 
// remove the CRED button
add_filter( 'toolset_cred_button_before_print', '__return_false' );
 
// remove the Access button for certain roles
add_filter( 'toolset_editor_add_access_button', function(){
 
$roles = array( 'author' );
return $roles;
} );
}
}
add_action( 'init', 'remove_toolset_buttons' );

Thank you

#530612

This issue is still unsolved. We are 5+ weeks after your last reply. Can you give an eta on an update that will solve this?
Thanks!

#531113

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Erik,

I am sorry about the delay, this is still in the queue of our development team. I have sent a follow up again and will update you on the status asap. In the meantime, the above solution that I proposed, were you able to use that if possible?

https://toolset.com/forums/topic/cred-interferes-with-gravity-forms/#post-514112

Thank you for the follow up.

#531537

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Erik,

I have got some update from the development team. We are on our way of fixing all the important issues (including this one) these days and these issues are our top priority right now.

We will provide you with a patch, even a dedicated one, once we are happy with the fix. However, no ETA is being provided but we are pushing it for resolution. Please feel free to follow up here in the coming week if needed.

I apologize for the delay, Thank you for your understanding

#532756

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Erik,

We have a patch fix available for this issue, please follow the details and use patch available here:
https://toolset.com/errata/cred-button-appears-broken-in-gravity-forms-confirmation-settings-editors/

I hope this will resolve the issue.
Thank you