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:
- I navigate to the “Stores”(the error occurs on any entity) collection and select a record (or view its details).
- 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.
- 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.” - 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”