1
votes

Router::requestAction has been removed in cakephp 2.x I need to call the action from route pages. Actually i want to update the cache for the url and from that i want to route the incoming pages. It was possible in 1.3 but no more used in higher version. How can i access the controller function when system checks on the route setting?

1
This sounds like you were doing something weird, and it broke. From the description, you shouldn't be calling requestAction - you should be calling whatever the controller action is calling. - AD7six
@AD7six This could be really a bad practice or wrong logic. But i want to make something like this. Described in ADmad answer's comment. - Sujan

1 Answers

2
votes

Router::requestAction() never existed even in 1.3. The function you are referring to is probably Object::requestAction() and is available in 2.x also. But in 2.x Router doesn't extends Object anymore and hence the function is not available. Still I don't see why you need to call a controller action to update your url cache. I presume you have routes and/or url slugs stored in db which you need and for that you should have a model function which returns the required info.