Question

I have a plugin called "Admin". When I go to /admin/users and view the list of users the links generated by paginate all look like /Admin/users/index/page:2.

If I visit /admin/users/index/page:2 (note the lower case "a") the links generated by paginate are correct again.

Any idea on how to fix this?

edit:

I'm not sure why this was down-voted.

I updated the URLs above

// Plugin/Admin/Config/routes.php
Router::Connect('/admin/:controller', array('plugin' => 'Admin', 'controller' => ':controller'));
Router::Connect('/admin/:controller/:action', array('plugin' => 'Admin', 'controller' => ':controller', 'action' => ':action'));

Removing those two lines seemed to fix my issue.

Was it helpful?

Solution

Commenting out these lines or changing the "A" in admin to "a" fixed it. Thanks @AD7six

// Plugin/Admin/Config/routes.php
Router::Connect('/admin/:controller', array('plugin' => 'admin', 'controller' => ':controller'));
Router::Connect('/admin/:controller/:action', array('plugin' => 'admin', 'controller' => ':controller', 'action' => ':action'));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top