Smart Chart - transitionTo: Expected id to be a string or number, received undefined

Hey Forest Admin team !

Feature(s) impacted

Service router in dashboard.

Observed behavior

Leads to " Our server encountered an error" instead of the page view.

Expected behavior

Work like the router in a smart view attached to a collection directly.

        this.router.transitionTo(
                "project.rendering.data.collection.list.view-edit.details",
                "shift",
                2,
        );

When I make a smart chart view attached to a collection (Layout editor, The collection I want to modify, Smart views tab), this route brings me to the edit view as excepted but the same code does not work with the dashboard.

Failure Logs

It leads to a page with the following message: ‘Our server encountered an error’
And I also have the following logs in the console:

Error while processing route: project.rendering.data.collection.list.view-edit.details Expected id to be a string or number, received undefined Error: Expected id to be a string or number, received undefined

and

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'queryParams')

Context

  • Project name: *******-trial
  • Team name: Operations
  • Environment name: Development

Thank you,

Hey @arms,

It’s because you are missing a parameter to your transitionTo

        this.router.transitionTo(
                "project.rendering.data.collection.list.view-edit.details",
                "shift",
                "shift",
                2,
        );

I know it’s a little bit weird to have twice the collection id but they might actually be different

2 Likes

Hey @vince ! Awesome, yeah a little bit confusing but understandable, could not find this information anywhere else, maybe I was looking at the wrong place all this time. Anyway, thanks :smiley: :+1: !