Support

Home Forums Event Espresso Premium Gravity Forms Conflict

Gravity Forms Conflict

Posted: March 31, 2015 at 10:46 am


Jonathan Whitney

March 31, 2015 at 10:46 am

When EE4 is active, my Gravity Forms license key disappears from the GF settings. I’ve enabled No Conflict mode in GF and also tried with the 2015 Theme. EE4 seems to cause the problem. Any ideas?


Lorenzo Orlando Caum

  • Support Staff

March 31, 2015 at 11:55 am

Hi Jonathan, I loaded Event Espresso 4.6.18 and Gravity Forms 1.9.5 (http://www.gravityhelp.com/gravity-forms-v1-9-5-released/) onto a test install and did not see this issue:

http://cl.ly/image/0V0I2i133a0c

Are there any other plugins on your site?


Lorenzo


Jonathan Whitney

March 31, 2015 at 12:08 pm

Lorenzo,

Thanks for your reply. I have deactivated all other plugins and addons. The only two active are Event Espresso 4.6.18.p and Gravity Forms 1.9.5

I’m on WordPress 4.1.1 and my theme is Twenty Fifteen. This is still occuring for me. When I initially enter the Gravity Forms license with both plugins active it says the license key is correct and applied. When I go to Plugins it shows that GF is not registered. When I return to the GF Settings page, the license key is blank.

If I deactivate EE4, everything works as it should.

J.D.


Lorenzo Orlando Caum

  • Support Staff

March 31, 2015 at 12:37 pm

Hi,

I’m still having trouble duplicating this issue.

Activated latest version of Gravity forms:

http://cl.ly/image/2X312D210k3q & http://cl.ly/image/3s3020123n1H

Activated latest version of Event Espresso:

http://cl.ly/image/2J0c1O3a221x

This site is also using WP 4.1.1.


Lorenzo


Jonathan Whitney

March 31, 2015 at 1:27 pm

I’ve uninstalled all my plugins except Gravity Forms. Then I reinstalled EE4. When I activated it and then refreshed the plugin page, it showed Gravity Forms as not registered.


Lorenzo Orlando Caum

  • Support Staff

March 31, 2015 at 1:30 pm

We would like to help but there isn’t much that we can do unless we can duplicate this issue on our end.

Does the same thing happen on another site?


Lorenzo


Jonathan Whitney

March 31, 2015 at 1:32 pm

I get that. I appreciate your help. I’ll try starting a new site and see if I can get things going or replicate when this issue begins.


Jonathan Whitney

March 31, 2015 at 3:31 pm

I just set up a brand new site, hosted by Dreamhost installed by their one-click install.

I installed Event Espresso 4.6.18.p.
I installed Gravity Forms 1.9.5.3.
I activated Gravity Forms.
I activated Event Espresso.
I input my correct license key for Gravity Forms.
I clicked on the plugins page.
It said I need to register Gravity Forms.
If I go back to the Gravity Forms settings page – the license key field is blank
I deactivate Event Expresso.
I reenter the license key.
Everything works (except EE of course).


Dean

April 1, 2015 at 3:13 am

Hi,

I’ve also run some tests with this and cannot replicate the issue.

When you are adding the key and testing, does anything happen to the rg_gforms_key option found in the wp_options table in the database?


Jonathan Whitney

April 1, 2015 at 8:43 am

When EE is activated, the row disappears. Even if I add the key again, GF will say on the settings page that the key is valid and applied, but the row still doesn’t exist in the db. If I deactivate EE, the row reappears when I add the key on the settings page.


Josh

  • Support Staff

April 1, 2015 at 12:48 pm

Hi Jonathan,

Let’s try adding the key via the wp-config.php file and see where that goes. Here’s how you add the key to wp-config.php:

1) Deactivate Gravity Forms
2) FTP in to the server and edit the wp-config.php file
3) On a line before it says to stop editing, you add this:

define('GF_LICENSE_KEY','YOUR_KEY_GOES_HERE');

Then you replace YOUR_KEY_GOES_HERE with your key and save the file.

4) Re-activate Gravity Forms.


Jonathan Whitney

April 1, 2015 at 2:49 pm

I did this and it didn’t help.

More experiments: If I do a direct INSERT of the rg_gforms_key option_name with the encrypted key as the option_value AND EE is activated, it will show that a row was inserted. As soon as I SELECT where the option_name=rg_gforms_key OR by the row_id of the inserted row, it returns 0 rows. It doesn’t do this when EE is not activated.

To experiment further, I renamed the option_name field to rgf_gforms_key and it still disappeared when EE was activated. The only thing I can see that is unique about this row in my table is that the option_value is a string that is the result of encryption, i.e. random letters and numbers. Could EE be deleting rows from this table on activation? If so, is it possible that something in my encrypted key is causing it to meet the requirements for deletion?


Josh

  • Support Staff

April 1, 2015 at 3:04 pm

Hi there,

My key is encrypted as well, but it’s not deleted.

Here is something else you can try:

1) Deactivate Gravity Forms.
2) Add your option key into the database.
3) Activate Event Espresso (leaving Gravity Forms deactivated)

Is the key still there?


Jonathan Whitney

April 1, 2015 at 3:13 pm

If you guys want to see this in action, at least on the WordPress Admin side of things, I’d be happy to give you an admin login to the blank test site I built yesterday to see if this happened on more than one site. Then you’d be able to see what I see.


Jonathan Whitney

April 1, 2015 at 3:13 pm

Josh,

I just did your next process as well and the key is deleted as soon as I activate Event Espresso.


Josh

  • Support Staff

April 1, 2015 at 3:19 pm

Do you have another server you can test on that’s not on Dreamhost?


Jonathan Whitney

April 1, 2015 at 3:48 pm

I can set one up on my local machine. I’ve also requested a new license key from Gravity Forms in case that is somehow a part of it.

I just ran another test:

If both plugins are deactivated and I manually add rg_gforms_key, when I activate EE it deletes the row.

If Gravity Forms is deactivated and Event Espresso is already activated, when I manually add the rg_gforms_key it is there. Then when I activate Gravity Forms it disappears.


Jonathan Whitney

April 1, 2015 at 5:02 pm

Tried a different license key from Gravity Forms. That’s not it.


Josh

  • Support Staff

April 1, 2015 at 6:36 pm

Hi Jonathan,

Here is another experiment you can try:
1) Deactivate Gravity Forms and Event Espresso.
2) Add your option key into the database.
3) Activate yet another plugin. Any other plugin will do, I can recommend any of the Featured plugins on this page. (Please be sure to keep Gravity Forms and Event Espresso deactivated).
Is the key still there?


Jonathan Whitney

April 2, 2015 at 10:25 am

I did a fresh install (wordpress latest release) on my local machine instead of Dreamhost and had the same issue.

Installed EE 1.4.2
Installed GF 4.6.18.p
Activated EE
Activated GF
Added license key to GF
rg_gforms_key was not added to the database

When I deactivated EE and readded the license key to GF, it works.

I deactivated both EE and GF with the license key in the db. I installed and activated WP Super Cache and the key was still there.

Thanks for staying in this with me. I really want to make Event Espresso work with this project.


Josh

  • Support Staff

April 2, 2015 at 1:07 pm

Can you try the current release of Gravity Forms? It’s the one I’m testing (version 1.9.5) and you can download it by logging into your Gravity Forms account and then go here:

http://www.gravityhelp.com/downloads/

Then if there’s no change to your situation, you can try adding a bit of debug code to your theme’s functions.php file:

function espresso_check_rg_gforms_key( $value, $old_value ) {
  var_dump( $value );
  var_dump( $old_value );
  wp_die();
}
add_filter( 'pre_update_option_rg_gforms_key', 'espresso_check_rg_gforms_key' );

You add the above while the key is in the options table. Then save the file and reload an admin page to trigger it. Then you should see some debug output, then you remove the debug code.

This might give us at least some kind of idea as to what mechanism is being used to remove that key.


Jonathan Whitney

April 2, 2015 at 2:04 pm

Sorry about that. I got the versions switched around. I’m using 1.9.5.3.

Where can I view the debug output? I didn’t see anything on the page I reloaded. (Sorry, not a php guy)


Jonathan Whitney

April 2, 2015 at 2:15 pm

Okay, I only see output from this function when I’ve got it in functions.php and am adding the key. It doesn’t give any output if I put it in when the key is present and then activate EE.


Josh

  • Support Staff

April 2, 2015 at 2:26 pm

Can you try version 1.9.5.4? That’s the current published version of Gravity Forms.


Jonathan Whitney

April 2, 2015 at 2:40 pm

Done. Same issue persists.


Josh

  • Support Staff

April 2, 2015 at 3:01 pm

Hi Jonathan,

Thanks for checking on that. This is some debug code that should output some useful information if the mechanism causing the rg_gforms_key option is delete_option(). Here’s the code you can add to the functions.php file:

function espresso_check_delete_rg_gforms_key( $option ) {
	var_dump( $option );
	debug_backtrace();
}
add_filter( 'delete_option_rg_gforms_key', 'espresso_check_delete_rg_gforms_key' );


Jonathan Whitney

April 2, 2015 at 3:35 pm

No output from that.


Josh

  • Support Staff

April 3, 2015 at 8:45 am

Hi Jonathan,

We can rule out a few other things if you can send FTP and WordPress admin level log in credentials for the testing site via the contact form on this page:

https://eventespresso.com/send-login-details/


Josh

  • Support Staff

April 3, 2015 at 2:26 pm

Hi Jonathan,

I went in and saved my Gravity Forms key and the value is sticking around with Event Espresso active. Can you try deleting my key, then add your key to the Gravity Forms settings and see if it sticks?

It may be related, but the WordPress database had a few issues with WordPress database errors. So I ran through a WordPress database upgrade from version 3.9.3 which took care of the WordPress database errors. So that might have helped.


Jonathan Whitney

April 3, 2015 at 2:48 pm

Wow. So I saw that. I logged in and saw your license key there and both plugins active. Then I put my key in and it vanished. No kidding. Can you try again with yours? I assume you’re just going to put it in like normal with both plugins active?

If so, is it the key that is possibly the issue? Even though this is my second key from Gravity Forms?

Feels like progress.


Josh

  • Support Staff

April 3, 2015 at 4:07 pm

I added my key back in and saved. I really don’t know why one key would work and another one not work, but someone from Gravity Forms might know.


Josh

  • Support Staff

April 3, 2015 at 4:09 pm

You might also try logging in with the admin account that you set up for Event Espresso staff and try adding your key while logged in with that account.


Jonathan Whitney

April 6, 2015 at 11:34 am

Josh,

I found what is causing the conflict. In:
event-espresso-core-reg-off/core/EE_Session.core.php

I changed the following line to turn off garbage collection:
// filter the query limit. Set to 0 to turn off garbage collection
$expired_session_transient_delete_query_limit = absint( apply_filters( ‘FHEE__EE_Session__garbage_collection___expired_session_transient_delete_query_limit’, 0));

That ended the problem. Something in the criteria for this process is including a row in wp_options that it shouldn’t. Is there any danger to turning off gargbage collection altogether or do we need to keep looking to find the issue in the criteria.

Thanks, JD


Josh

  • Support Staff

April 6, 2015 at 12:12 pm

Thanks for the update Jonathan. This really helps. We can add a fix to the next minor update release of Event Espresso to ensure that it only deletes the transient keys. The query needs an adjustment to ensure that **only** options keys that handle EE sessions get cleaned up.

Turning off garbage collection completely will result in your wp_options table getting overloaded with expired session transients, which would lead to your site progressively slowing down, so I wouldn’t recommend turning off garbage collection.


Jonathan Whitney

April 6, 2015 at 1:21 pm

Thanks Josh,

When do you think the next minor release will be? I am still in development for another 2 weeks and then hoping to go live. I’d like to have it by then. If you don’t have it by then, any chance you could send me that code snippet so I can turn it back on?

Thanks!


Josh

  • Support Staff

April 6, 2015 at 2:01 pm

We’ll have something by either later today or tomorrow.


Jonathan Whitney

April 6, 2015 at 4:25 pm

Great! Thanks so much!

J.D.


Josh

  • Support Staff

April 8, 2015 at 6:51 am

Hi Jonathan,

We resolved an update yesterday (version 4.6.19.p) that will resolve this issue for you.

The support post ‘Gravity Forms Conflict’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso