New Blog Templates Plugin Incompatible with Gravity Forms

I love the New Blog Template plugin, but currently, it’s incompatible with another very popular WordPress plugin, Gravity Forms.

When the additional tables aren’t copied (i.e. wp_12_rg_form), you can’t create new forms at all; they won’t save. When you copy any or all of the additional tables over, though, you get a different issue:

Each form you subsequently create with a template is resigned to the ID of 0. That means that edits to one form are enacted on all the other 0 ID’ed forms, as well, making Gravity Forms less than useful.

To note, there shouldn’t be forms with an ID of 0; the first form always gets an ID of 1. Gravity Forms is also not accepting new entries on these 0 ID’ed forms, making this issue fairly tough to work around.

Above you’ll find the most recent copy of the Gravity Forms plugin. I’m willing to make a donation to whomever corrects this issue within 24 hours. It’s obviously important to me–I’ve already spent the money on a WPMDev subscription, as well as GF, so I’m not going to go cheapskate now.

If anyone is willing to take on this task, please note that Gravity Forms should work using network activation and New Blog Templates set to carry over plugins and their settings.

  • Aaron
    • CTO

    Jason, again let me point you to my answer:

    We don’t plan on building in support for advanced plugins that create their own db tables right now, thats a slippery slope to go down. As it is the fact that most plugins that use blog options work with it is an added bonus, the core purpose of New Blog Templates is to be able to carry over any WP blog preference/posts/categories/etc.

    Just deactivate incompatible plugins on the template blog and NBT will work fine.

  • Jason Pelker
    • Flash Drive

    It’s impossible to deactivate the Gravity Forms plugin on the templated site when GF (or any other plugin causing the same types of issues) is network activated. Could there be some other solution?

    Additionally, even if I deactivate GF on the template site, once I clone that site and then attempt to activate GF solely on the clone, I get the same errors as before; new forms cannot be created.

    Please explain.

  • Aaron
    • CTO

    Didn’t know you could network activate gravity forms. Most plugins won’t run the install script when network activated. That’s a very strange issue. A lot of it depends on how it checks whether to run an install script. If you can remove whatever flag it sets on install in the blog options table of the template blog (and keep it from changing, possibly by never visiting it, or blocking install on that specific blog id), then likely it would work with NBT.

  • Mason
    • DEV MAN’s Sidekick

    I tried a different approach, but am seeing the same result as Jason.

    I modified Gravity Forms to work as an mu-plugin. It’s automatically setup to work for each of my users. With blog_templates, a new site is created and though Gravity Forms was activated, it wouldn’t allow form creation. Now that blog_templates allows for db tables, I changed the settings to copy these tables as well. I’m seeing the same thing as Jason – Gravity Forms allows users to create a new form, but when they save it, it’s given an ID of 0 and they cannot create any other forms.

    I believe that before using blog_templates, Gravity Forms worked fine as an mu-plugin and users could create forms as expected. I honestly don’t remember for sure… I’ll have to go back, deactivate blog_templates and see if that was the case.

  • Jason Pelker
    • Flash Drive

    @james: I tested the bejeezus out of Gravity Forms and did everything in my power to get GF to work with New Blog Templates–every possible combination of turning the plugin on and off, etc. Nothing will allow this two to get along currently, so again, I cannot use New Blog Templates, although I really, really would like to (it’s a long overdue, brilliant idea).

    Any WP geniuses out there with any ideas on how to fix this issue? I’m at the end of my rope and I am offering a bounty to make it happen.

  • Mason
    • DEV MAN’s Sidekick

    @jason thanks for the feedback on the article. It wasn’t as long in my head when I was writing… ah well.

    If I find a solution for the GF + New Blog Templates I’ll let ya know. I’ve got a site that I’d like to see that combination implemented on, but it’s not a deal breaker for me. Still, worth looking into.

  • nacke81
    • WPMU DEV Initiate

    Just found this thread … I’m having the same problem. And I really need the blog templates plugin (that’s why I subscribed) to work, and I’m also bound to the Gravity Forms plugin.

    Did anyone ever figure this one out?

    If not, is there another plugin like Gravity Forms that allows users to submit posts from a front end form?

    This is killing me.

  • stevedaily
    • New Recruit

    I have not encountered any of these problems related to Gravity Forms and the New Blog Template plugin. Jason says at the very top of this thread, “When the additional tables aren’t copied (i.e. wp_12_rg_form), you can’t create new forms at all; they won’t save.” In my experience, the tables are copied.

    I am using New Blog Templates plugin v 1.6 and Gravity Forms v., WP version 3.3.1.

    Note that in the New Blog Templates settings, there is an “advanced” option to “add full tables to the template, in case you’re using a plugin that creates its own database tables.” I use this option. After creating a new site, I can add new GF forms to it, and they are numbered sequentially, as expected.

  • thoncs
    • WPMU DEV Initiate

    I understand the current state of this problem, but didn’t catch the ‘advanced’ tab before I duplicated a site with NBT. I’ve now got a site nearing completion but can’t get forms to save. Has anyone got a manual fix for clearing this up after NOT copying over the tables? In other words, is there some way to dig into the db and manually clear the problem? It seems that there are no *_rg_* fields in the recreated site’s section of the db. Are they in the main site’s *_rg_* fields since GF was initially network enabled?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.