Skip to content

Fixed issue where GF Feed Forge reprocessing would not properly handle edited entries for Gravity Connect plugins.#20

Draft
saifsultanc wants to merge 1 commit into
masterfrom
saif/fix/95892-fix-gc-plugins-edit
Draft

Fixed issue where GF Feed Forge reprocessing would not properly handle edited entries for Gravity Connect plugins.#20
saifsultanc wants to merge 1 commit into
masterfrom
saif/fix/95892-fix-gc-plugins-edit

Conversation

@saifsultanc
Copy link
Copy Markdown
Contributor

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/3193477620/95892?viewId=3808239

Summary

Fixes GF Feed Forge reprocessing for edited Gravity Connect plugin entries. Previously, entries edited while feeds were inactive would not be properly detected during bulk reprocessing, causing "Add Record" actions instead of "Update Record" actions.

Now detects previously processed GC plugin entries and routes them to the correct edit pathway, ensuring proper update operations.

DEMO:
https://www.loom.com/share/4d0a4b3b2572446a87d3cc204ac01f08

Checklist

  • Updated customer telling them that a fix/addition is in the works.
  • Added/Improved Cypress tests or a note under Summary why tests are not included in the PR.
  • Added a link to this PR in the Help Scout ticket(s) in the form of a note
  • Added/updated hook documentation if applicable.
  • Sent a packed build of this PR/branch for the customer to test.

…e edited entries for Gravity Connect plugins.

~ Fixed PHPCS.
Copy link
Copy Markdown
Contributor

@veryspry veryspry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saifsultanc

I'm thinking this should be handled at the GC plugin level by adding "upsert" functionality to the add_entry_to_resource_methods().

My gut feel is that adding upsert logic at the GC plugin to add_entry_to_resource() methods will be a lot easier to work with in the long run (less points of failure). Would also help ensure compatibility for any other plugins using the GF Feed Processor.

Here's a very untested patch of approximately what that would look like in GCA: gca.patch

And a Loom talking through it: https://www.loom.com/share/aecd622936bc4e3e88c879cc866ee344

Edit: here's the Airtable get record endpoint reference https://airtable.com/developers/web/api/get-record

$resource_id = $addon->get_resource_id( $entry, $feed );

// Build the edit hook name from addon slug (e.g., gc-airtable -> gc_airtable_edit_entry_in_database)
$edit_hook_name = str_replace( '-', '_', $feed['addon_slug'] ) . '_edit_entry_in_database';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also get hook name like this:

$addon->hook_name_add_entry_to_resource();

@saifsultanc saifsultanc marked this pull request as draft March 14, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants