Duplicate action fails after filtering records in search bar

Feature(s) impacted

The “Duplicate” action in the Forest Admin interface for creating a new record by duplicating an existing one.

Observed behavior

When attempting to duplicate a record in the Forest Admin interface, the action fails with an error if a search or filter is applied in the top search bar before triggering the “Duplicate” action. Specifically:

  1. I navigate to the “Stores”(the error occurs on any entity) collection and select a record (or view its details).
  2. If I use the search bar at the top to filter records (e.g., by typing a keyword), and then select a record and use the “Actions → Duplicate” option, the duplication process fails.
  3. After filling in the fields (or leaving them as is) in the duplicate form and submitting, an error message appears:
    “An error occurred when trying to create store. The stores__meta__ field was not found. AVAILABLE_FIELDS: [id, external_id, enabled, name, custom_name, description, domain, lat, lng, address, translations, offline, phone, status, source, synonyms, last_sync_at, created_at, updated_at, banners, offers, verticals, stores_domains, stores_countries, image, imagePreview, logo, logoPreview, store_location, en_description, pt_description]. PLEASE CHECK IF THE FIELD NAME IS CORRECT.”
  4. Additionally, any “Before Create” hooks I’ve set up are not triggered when this error occurs, as the process fails before reaching that stage.

However, if I do not use the search/filter bar and simply select a record and duplicate it, the action works as expected, and a new record is created successfully.

Expected behavior

The “Duplicate” action should work consistently, regardless of whether a search or filter is applied in the top search bar. After selecting a record, choosing “Actions → Duplicate,” filling in the form, and submitting, a new record should be created successfully without errors.

Failure Logs

Error message displayed in the UI:

Additionally, the following log snippet from the agent indicates the issue:

Context

  • Project name: test
  • Team name: test
  • Environment name: development
  • Database type: supabase
  • Recent changes made on your end if any: no

And, if you are self-hosting your agent:

  • Agent technology: nodejs
  • Agent (forest package) name & version (from your .lock file): “@forestadmin/agent”: “^1.64.1”

Hello @ranton

Thank you for reaching out and sorry for the inconvenience.

I am able to reproduce your issue and created a bug ticket.

We will come back to you once it is fixed.

Nicolas

1 Like

Hi @nbouliol ,

Thank you for creating the bug ticket and looking into the issue.

I was just wondering if there’s any update on when the fix might be available?

Hello @ranton

The fix was under review, it has now been released.

Sorry for the delay

Nicolas

1 Like

Hi @nbouliol

Thanks for the update! We’ve checked the fix, and it seems to be working as expected.

Appreciate it!

1 Like

Hi @nbouliol ,

It looks like duplication is broken again (but with a different error). Could you please check?

Hi @ranton

Can you please try to create a new record with the same data without duplicating an existing one ?

Can you inspect the console network in your browser to check if the payload sent to your agent seems correct ?

Can you share a screen with the full error log from your agent ?

Thank you

Hi @nbouliol ,

Can you please try to create a new record with the same data without duplicating an existing one ?

the new store has been created without any issues:

Can you inspect the console network in your browser to check if the payload sent to your agent seems correct ?

Can you share a screen with the full error log from your agent ?

Everything worked fine in the morning, but then it broke.

This also applies to all entities.

Hello @ranton,

Thank you for your answers.

Do you mean you can’t create new records ? Or it applies only to duplicating ?

On the store collection, for which fields are you using the @forestadmin/plugin-aws-s3 plugin ?

Do you have the same error for other entities ?

Hi @nbouliol ,

Do you mean you can’t create new records ? Or it applies only to duplicating ?

It applies only to duplicating

On the store collection, for which fields are you using the @forestadmin/plugin-aws-s3 plugin ?

for image and logo fields

Do you have the same error for other entities ?

Yes, for other entities with images/logos.

I checked that the issue with these image/logo fields (any of them).

If i duplicate without them - it works.
Trying to understand where the problem.