Integration with Gravity Forms

0

I have started using the New Blog Templates plugin and I really love it … except it has a problem with duplicating sites that are using Gravity Forms.

I’m not 100% sure I even understand the problem, but it seems that New Blog Templates is unable to duplicate database info from plugins that create their own data … is that right?

I believe this has already been mentioned on here, and I found a workaround for it on the Gravity Forms forum, but I’m wondering if you are planning to address it.

I’m building a network of blogs right now using New Blog Templates, and this problem prevents new sites from setting up correctly when new users create their own blogs via http://site.com/wp-signup.php.

Every time a new blog is created, I have to go into the network administration to perform the workaround.

  • Mason
    • DEV MAN’s Sidekick

    Hiya nacke81,

    Actually, I believe we do have this working correctly with Gravity Forms. If you click on the Blog Template you should see a list of tables in “Advanced Options”.

    Any table that has an “rg” prefix is for gravity forms. If you want the data to be copied to new sites, just select these tables in the template and save.

    Thanks!

  • rnz
    • Design Lord, Child of Thor

    Hmmm. Not sure about this. Is this consistent with the following posting from one of the Gravity Forms crew in their forums?

    “@wanbooven The issue is as I explained above. If you are using a tool to duplicate blog content when creating a new site in a WordPress network setup and it’s duplicating the Gravity Forms data in the options table… this causes the issue.

    Gravity Forms stores the version of Gravity Forms that is installed int he options table using this key:

    rg_forms_version

    If that key exists, Gravity Forms thinks it is already installed and does not run it’s setup routine… and thus does not create the necessary database tables for Gravity Forms to function properly.

    So what is happening is you are duplicating a site that already has the rg_forms_version value already set in wp_options and therefore the duplicated site thinks Gravity Forms is already setup properly.

    When duplicating sites you can’t duplicate this value, otherwise the Gravity Forms setup routine does not work.”

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    From line 36 of the blogtemplates.php file:

    /**
    * Exclude Gravity Forms option AND Formidable Pro (thank you, wecreateyou/Stephanie).
    **/
    function blog_template_exclude_gravity_forms( $and ) {
    //$and .= " AND <code>option_name</code> != 'rg_forms_version'";
    $and .= " AND <code>option_name</code> NOT IN ('rg_forms_version','frm_db_version','frmpro_db_version')";
    return $and;
    }
    add_filter( 'blog_template_exclude_settings', 'blog_template_exclude_gravity_forms' );

    We DO have this built in by default. I actually personally spoke with Carl several months ago about this so that we could provide this. Unless they’ve changed something recently it should work fine.

    But we were thinking of leaving it off and letting users turn it on blog-by-blog if they want it. Would this approach prevent the problem?

    Yes. This would also work fine. The only scenario where this really comes into play is when you’re copying from a template blog that has gravityforms installed/activated.

    Thanks!