Error while using redirectTo to add filters to the current page

Feature(s) impacted

Filters
SmartActions
redirectTo

Observed behavior

  1. When on a list that we want to filter
  2. We implemented a smart action with a form that prompts the user for some filter options (city, distance from the city, some roles in an enum)
  3. The smart action constructs a new url with the filters in the query params
  4. At the end of the smart action, we call res.send({ redirectTo: url })
  5. The url is loaded, a request is made and load the correct list according to the filters
  6. Immediately, another request is made without filters and replaces the correct results with the entire list, ignoring the filters

More info:

  • It only happens in Preprod (staging) env and Prod env, not in development. All of these environments have been upgraded to v9
  • When you copy the url with filters and open it in a new tab, everything works as expected

Expected behavior

When loading the url with the filters, only the correct request should be called.

Questions

Is our use of redirectTo correct?
Is there a better way to update the filters on a page than calling redirectTo?

Failure Logs

None

Context

  • Project name: ClickAndCare
  • Team name: ClickAndCare
  • Environment name: Preprod
  • Agent (forest package) name & version: 9.3
  • Database type: PostgreSQL 12
  • Recent changes made on your end if any: None

hello @Florian_Click ,

Welcome to the community !

Following your detailed post, I have tried to reproduce the issue in similar conditions but to no avail, the filtered redirection works.
Would you be able to share the complete code of your smart action implementation ? You can share it in private message if neeeded.

A couple things you can also check:

  • do you see any errors in the console of the application before or during redirection (check preserve logs if you see that logs disappear during redirection)?
  • Are you running the exact same version of the agent forest-express-sequelize in all environments ?

Thanks for your input,

Regards