• Resolved mattkiosk

    (@mattkiosk)


    Hello, all! I’m hoping someone can help me with a slight issue I’m having with a combination of plugins. The site in question acts as a business directory. The expected workflow is that a user will come to the site and fill out a form for a business they own which is submitted for approval by an editor before publishing. The form is built with GravityForms and includes inputs for neighborhood and business type, both of which are custom taxonomies.

    Up until yesterday, things were working properly. The neighborhood form input is a select list and was populating properly as was the business type, which was a field of checkboxes. The plugins and versions that we were using:

    • GravityForms (v1.9.16)
    • Gravity Forms + Custom Post Types (v3.1)
    • Gravity Forms: Post Updates (v1.2.23)

    Yesterday afternoon, however, we upgraded Gravity Forms + Custom Post Types (v3.1.1) and noticed that the custom taxonomies are no longer saving. The form submits as normal with no error messages and the custom post type is correct in all other aspects, save the “missing” taxonomies.

    After digging through the code, I threw a logging statement before each call to wp_set_object_terms I could find in our theme and all our plugins and I discovered what’s happening, though not how to resolve it. It appears that Gravity Forms: Post Updates has some functionality to remove all custom taxonomies during the gform_after_submission filter.

    It appears that, previously (line 34), Gravity Forms + Custom Post Types hooked it’s save_taxonomies() function call to an action, gform_post_submission, that ran after gform_after_submission. However, the change to gform_after_create_post means that it runs before.

    More simply, Gravity Forms + Custom Post Types is saving all the custom taxonomies and then, immediately after, Gravity Forms: Post Updates is deleting them all resulting in “missing” data.

    I just discovered this last night and only gathered my thoughts this morning. I’m going to play around with moving around when the hooks fire, but I’m curious if anyone else has had this issue and, if so, what they did to resolve? It seems like this might be a genuine bug as I haven’t found anything in our theme that would alter the order in which these things should happen.

    Any info would be appreciated. Thanks!

    -M

    https://www.ads-software.com/plugins/gravity-forms-custom-post-types/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter mattkiosk

    (@mattkiosk)

    As a temporary hack, I’ve commented out this line from the Gravity Forms: Post Updates plugin. I suspect that plugin hasn’t yet adjusted to work with the 3.1.1 changes to Custom Post Types. I’m testing now to see who adverse effects, if any, crop up and will post again if I find anything, good or bad, that occurs.

    Thanks Matt,

    This helped me just now!

    Damien

    Thread Starter mattkiosk

    (@mattkiosk)

    You’re welcome, Damien. I should note that while testing didn’t prove to find anything truly awful occurring due to the hack, it was still to dodgy for a production deployment. Instead, we ended up rolling back to the previous 3.1 version of Custom Post Types that we had lying around on out development server.

    That said, I’m still curious if the plugin author or any other user has some insight into what’s broken and how to resolve.

    Same issue

    I’m having the same issue. @mattkiosk, can you share a .zip of v3.1? I’m having a hrd time finding this to fall back on…

    Thread Starter mattkiosk

    (@mattkiosk)

    @zackdn Here you go!

    @mattkiosk Thank You so much! I just went back to 3.1 too.

    Plugin Author Dave from Gravity Wiz

    (@spivurno)

    Is this only occurring when you have the Gravity Forms: Update Post plugin active?

    Joining the group… Same issue of 3.1.1 not saving taxonomies.

    Rolled back to 3.1 and everything works again.

    Plugin Author Dave from Gravity Wiz

    (@spivurno)

    Hi Redpup, please see my question directly above your post. I have not been able to recreate this issue so far. Can one of you please provide a step by step guide to how you’re recreating the issue as well as any GF-releated plugins you are also running?

    Hi David,

    I have the following config:

    Gravity Forms Version
    1.9.17.10

    Installed Add-Ons
    Name Version
    User Registration Add-On 3.2.2
    gravity-forms-post-updates 1.2.23
    gravityforms-savedforms 0.5.0.0
    gravity-forms-google-analytics-event-tracking 1.6.5
    MailChimp Add-On 3.7.1
    gravity-forms-no-captcha-recaptcha 1.0.7
    gravity-forms-custom-post-types 3.1
    gravity-forms-geo-fields 1.5

    WordPress Version
    4.4.2

    Hi. Sorry, Details would help, yeah?

    WP 4.5
    GF + CPT – 3.1
    GF: Post Updates (jupitercow) 1.2.23
    GF – 1.9.18
    GF Survey Add-On 3.0
    GF User REgistration Add-on 3.3

    With GF+CPT 3.1, everything works.

    Updating to 3.1.1 and GF: Post Updates active, Taxonomies are not saved.

    Updating to 3.1.1 and deactivating GF: Post Updates, Taxonomies ARE saved.

    Seems to be a conflict with 3.1.1 and GF:PU. Does that help with troubleshooting?

    Thanks

    Plugin Author Dave from Gravity Wiz

    (@spivurno)

    Thank you! ??

    I’ve just pushed an update that addresses this issue (v3.1.3). It should be available momentarily.

    v3.1.3 works!

    Thanks for the quick fix.

    Plugin Author Dave from Gravity Wiz

    (@spivurno)

    Glad to help!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Custom Post Type not saving taxonomies’ is closed to new replies.