Gform_advancedpostcreation_post_after_creation() not firing?

Hi!

I have a weird issue where gform_advancedpostcreation_post_after_creation() doesn’t seem to be firing correctly.

Here’s some test code:

        function gforms_post_creation($post_id, $feed, $entry, $form)
        {
            dump('test');
        }
        add_action('gform_advancedpostcreation_post_after_creation_16', 'gforms_post_creation', 10, 4);

I’ve tried omitting the form ID (16) and that doesn’t seem to solve the issue.

Some things that I think may potentially pose a problem:

  • Posts are created as drafts - do they need to be published in order for this to work?
  • Posts are a custom post type - though I don’t imagine this could be the issue really.

Is there anything else I might be missing here?

Thanks in advance for any assistance!

Add-on feeds are processed via a separate background request, so that way of troubleshooting won’t work. You can use custom logging statements instead: Custom Logging Statements - Gravity Forms Documentation

In this case, you could use gf_advancedpostcreation()->log_debug( 'test' );

That will write to the add-on log if logging is enabled on the Forms > Settings page, and logging for the add-on is enabled on the Forms > Settings > Logging page.

1 Like

Ah I see! Thanks a lot for that - rookie mistake!

After adding that in and checking the logs, I still don’t see my “test” in the logs. However I do see:

2025-01-06 16:47:42.667896 - DEBUG --> GFFeedAddOn::maybe_process_feed(): Checking for feeds to process for entry #6254 for gravityformsadvancedpostcreation. 
2025-01-06 16:47:42.668598 - DEBUG --> GFFeedAddOn::maybe_process_feed(): Adding feed (#2 - Writers' Academy Feed) for entry #6254 for gravityformsadvancedpostcreation to the processing queue. 
2025-01-06 16:47:42.789959 - DEBUG --> GF_Feed_Processor::task(): Starting to process feed (#2 - Writers' Academy Feed) for entry #6254 for gravityformsadvancedpostcreation. Attempt number: 1 
2025-01-06 16:47:42.817420 - DEBUG --> GF_Advanced_Post_Creation::maybe_handle_post_media(): No files uploaded for field ID 21. 
2025-01-06 16:49:22.056804 - DEBUG --> GF_Feed_Processor::task(): attempted feed (#2 - Writers' Academy Feed) for entry #6254 for gravityformsadvancedpostcreation too many times. Bailing.

A cursory Googling suggests that this could be related to an issue with /wp-admin/admin-ajax.php - however there’s no errors in my System Report page. Is there anything else I need to check? Am I even barking up the right tree here?

Thanks again for your help!

Hi Tom. If the feeds are being added to the processing queue but never processed, that is the issue. Please see our troubleshooting steps here:

Thank you.

1 Like