View Full Version : controller action call undefined after history.go(-1)

26 Oct 2011, 12:30 PM
Hello everyone,

I have an accordion. When I click on the item, it shows the detail card. (The viewport is with card layout and that sets the active item upon clicking the item) On the detail page, I have a back button. The handler for that does history.go(-1). Once I press the back button, and the accordion page is shown again, every click on the item shows the following error.

TypeError: 'undefined' is not a function (evaluating 'controller[action].call(controller, interaction)')

Any insight into what could be responsible?


26 Oct 2011, 3:46 PM
OK.. I solved it. Temporarily. But still looking for the real cause of the problem. Need help.

This is strange behavior.
Basically, I was going from Pages/list to Pages/article/xxx where Pages is the controller, and list and article are the actions.
To solve this, I changes my Pages/article/xxx to Articles/show/xxx. So I changed the controller for the article action.

This is not a solution, because I am sure I would need to use the same controller in the similar fashion in the app again.

I am not sure what exactly are are the rules/best practices to solve the issue without changing the controller.

Anyone else having the same issue?