milesj / forum

[Deprecated] A CakePHP plugin for forum / bulletin board systems.
MIT License
131 stars 57 forks source link

Missing Method in UsersController #23

Closed ghost closed 12 years ago

ghost commented 12 years ago

Error: The action dashboard is not defined in controller UsersController

Error: Create UsersController::dashboard() in file: app/Controller/UsersController.php. <?php class UsersController extends AppController { public function dashboard() { } }

As soon as user logs into forum, when he clicks on profile or dashboard hyperlink it gives out this error. After couple of page refresh it works fine. Not sure what the problem is.

ghost commented 12 years ago

Following is from error.log under tmp folder

Error: [MissingActionException] Action UsersController::profile() could not be found.

0 .../lib/Cake/Routing/Dispatcher.php(107): Controller->invokeAction(Object(CakeRequest))

1 .../lib/Cake/Routing/Dispatcher.php(89): Dispatcher->_invoke(Object(UsersController), Object(CakeRequest), Object(CakeResponse))

2 .../app/webroot/index.php(96): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))

3 {main}

milesj commented 12 years ago

Fixed in 3.1.1

ghost commented 12 years ago

This problem still persist. The situation is, I login to the the forum, when the next link I click after the page loads is either "Profile" or "Dashboard", it throws the above error.

milesj commented 12 years ago

Sorry I can't reproduce this. This exact error is a Cake error, not really the plugins fault.

dereuromark commented 12 years ago

sounds like a class conflict. do you have another class (controller) called exactly the same? you are only allowed to have a single class with this name in your whole app. otherwise you create a conflict which would result in pretty much the same issue you are describing (after a few page refreshs in debug mode the cache will renew itself - hence the correct class would be loaded at this point)

milesj commented 12 years ago

And that is why I wish Cake 2.0 used namespaces :P

dereuromark commented 12 years ago

fortunately we only need to wait another few months - 3.0 will be awesome :)

milesj commented 12 years ago

Yeah, gonna be a major upgrade pain however.

dereuromark commented 12 years ago

Well, I am gonna provide the automagic for it - as usual :)

ghost commented 12 years ago

Oh yeah! I had the same controller name on my app/Controller. Thanks dereuromark!