cram1010 Posted September 2, 2013 Share Posted September 2, 2013 (edited) I'm creating a very simple custom admin module, which introduces a "Family" taxonomy quite similar to the core "Supplier" functionality. Things worked fine, except that the "Add New" button in the toolbar didn't work. When it was clicked, it redirected to the dashboard. I found out that the href of the "Add New" button was: &addfamily&token=some_token instead of /index.php?controller=AdminFamilies&addfamily&token=some_token. To correct it, I had to add in my AdminFamiliesController constructor: self::$currentIndex = 'index.php?controller=AdminFamilies'; Not very nice, but then the href was the correct. But it wasn't all. Now that the href vas the correct, clicking in the "Add New" button didn't redirect to the dashboard, but to the list again. I digged a little more and found out that "AdminController->initProcess()" wasn't being called. This is essential because it is the responsible to redirect to one action or another in function of the GET parameters. I added: $this->initProcess(); and now it works. But my question is if all of this is required. That two things should work out of the box. $currentIndex should be set, and initProcess() should be called. Am I missing something or it is supposed to work that way? Edited September 2, 2013 by cram1010 (see edit history) 1 Link to comment Share on other sites More sharing options...
cram1010 Posted September 2, 2013 Author Share Posted September 2, 2013 Solved. I forgot to call parent::init() in my overriden one Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now