Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [admin-controller]

Denotes questions related to Admin Area's Controller. A controller is a part of Model-View-Controller Architecture.

0
votes
5answers
2k views

Custom admin menu redirecting to dashboard in Magento 2

I have created custom admin menu but when clicking on the menu it is redirecting to dashboard. Here is the xml within etc/adminhtml/menu.xml : <?xml version="1.0"?> <config xmlns:...
1
vote
1answer
364 views

only template Controller

I'm working on a module in the admin part but can someone tell me please how I can load just my template from my controller without the admin menu in the left, the title and the footer. here is one ...
0
votes
1answer
49 views

controller is not overwriting in adminhtml. I have added in di.xml

Controller File: <?php /** * * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ namespace Sm\Ordertype\Controller\Adminhtml\Invoice\AbstractInvoice; ...
0
votes
1answer
20 views

Admin form using same Action Method for both?

Magento 1.7 In the Admin Panel under System-->Permissions-->Users When I click on a User OR "Add New User" and I right click and inspect element I see the following for both: They both share the ...
3
votes
1answer
1k views

Ajax not working in Magento 2 admin

I'm using ajax in Magento 2 admin. But it not working. My controller: class CustomAjax extends \Magento\Backend\App\Action{ protected $resultJsonFactory; public function __construct( \Magento\...
1
vote
4answers
697 views

Can't access magento 2.1.3 admin getting some error

While trying to access the admin panel i got following error. This was shown up from yesterday up to that time i don't have any issue 1 exception(s): Exception #0 (Magento\Framework\Exception\...
0
votes
2answers
62 views

How use the default Magento's 'saveAction'

I want to change the $product->save(); for the saveAction Magento use's when you push the button in the admin. I don't know why, but with the first doesn't save it equal. I need to don't go or be ...
0
votes
2answers
2k views

Admin controller throws 404 page not found for my custom extension

I am creating a custom extension with Magento 1.9.0.1 but got stuck in admin controller as my admin controller throws 404 page not found error. Any help would be appreciated. Below is my code : ...
0
votes
2answers
231 views

Magento2 : new admin page controller issue

In order to add a new admin page, I follow this tutorial : in the routes.xml, If I use as it is said the module name for id and frontname, I get an error when I try to access magento2 backend ...
0
votes
1answer
456 views

Adminhtml - NULL in saveAction() form

I'm creating a new admin module, when i click on save button in my form, he calls saveAction with all paramaters fields but he saves me NULL value. I think that the problem comes from saveAction() but ...
0
votes
1answer
33 views

Why does my view page not load in Admin Panel?

I need your help to figure out why my form isn't loading in the Admin Panel. I currently just get the error: Fatal error: Call to a member function setData() on a non-object in /home/makeyou/...
0
votes
0answers
34 views

how to get selected categoryIds in magento 2?

I want to get selected categoryId to save it : $productObj->setCategoryIds(selectedCategoryId); $productObj->save();
0
votes
2answers
984 views

How to call adminhtml controller?

I want to call my custom adminhtml controller on form action. see my config file admin please and how to call controller. <?xml version="1.0"?> <config> <modules> <...
5
votes
1answer
329 views

Magento 1: adminhtml controller rewrite and module dependencies

Explanation So I have a module, I'll call it Hello_World with the following code in config.xml <admin> <routers> <adminhtml> <args> &...
0
votes
1answer
2k views

magento2 admin : generate controller url for form action

On a Magento2 admin page (order/view) I added a form using phtml file with block. I would like to define my form action to my controller url : www.xxx.com/admin_toto/foo/bar/index How can I generate ...
1
vote
3answers
1k views

Magento2 : admin controller not working

i created a button in the order/view page in magento2 backend, and would like to call a controller when button in clicked. In my module, I added : etc/adminhtml/routes.xml <?xml version="1.0" ?&...
1
vote
1answer
648 views

how can I append custom block to head in adminhtml controller action

I was trying to add a block to the head in magento backend for a specific controller action. public function updateAction(){ $block = $this->getLayout()->createBlock( '...
0
votes
1answer
40 views

magento edit not working in admin form

I try to add new Form Every filed save properly in database <?php class MPS_Gallery_Adminhtml_GalleryController extends Mage_Adminhtml_Controller_action { protected function _initAction() ...
0
votes
1answer
376 views

Template for custom admin panel tab

I've created a module which creates a custom tab in the admin panel but I've not been able to display the required data.` This is my config.xml file Path: app/code/community/Rohan/...
3
votes
4answers
6k views

Magento 2 custom Admin controller redirect to Dashboard

I am trying to add a new Admin Menu in Magento 2 for first time. I followed these tutorials: https://www.mageplaza.com/magento-2-module-development/create-admin-menu-magento-2.html https://www....
1
vote
2answers
479 views

Magento 2 - custom admin menu > access denied

i have this controller News\LatestNews\Controller\Adminhtml\News.php and if i comment this protected function _isAllowed() { // return $this->_authorization->isAllowed('News_LatestNews::...
2
votes
4answers
4k views

How to send ADMIN AJAX request?

I need to retrieve some information from my custom admin controller using AJAX. But when AJAX is used I get current page's entire HTML ! I simply want to get some JSON data from my custom ...
1
vote
1answer
243 views

Overriding local controller with own new local controller

I've added some functionality to the Amasty_Xcoupon module, but after upgrading from v1.0.6 to 1.1.6, the codepool of the module changed from community to local. This somehow results in my controller ...
3
votes
1answer
635 views

Magento 2 admin form controller error

So i have a controller to access form with structure like this: Controller>Adminhtml>Preferences>NewAction.php but when i try to acces /preferences/new, it gives me an error like this: Fatal ...
0
votes
1answer
86 views

Why does magento wait for a request to complete before processing others?

I have added a script to an admin page on a magento site to initiate a long running process and periodically query the progress using AJAX (or XHR) requests so that it can update a progress bar. The ...
0
votes
1answer
166 views

Magento grid _addButton that filters collection from the controller. How?

we have a grid where we add a button. It triggers the shownewonlyAction in the controlller. But I have no idea how to set a filter (or even reset all filters) in the controller shownewonlyAction (). ...
0
votes
0answers
443 views

Magento 2.0 Pass custom input in phtml to controller

I want pass an input data from phtm file to controller. I create a js file and I can get the value of input that I want pass but how I pass this value to controller only with JavaScript (no Jquery). ...
1
vote
2answers
162 views

Fatal error: Call to a member function Fatal error: Call to a member function setRecipeProducts()

I am getting the error in my custom admin module - Fatal error: Call to a member function setRecipeProducts() on a non-object in C:\xampp\htdocs\sample\app\code\local\Sigmasolve\Recipe\controllers\...
0
votes
1answer
31 views

Override Admin Controller - All Url paths included - Magento 1.7

I want to override this specific controller file: (app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php) I created a custom module with the following files and their contents: ...
0
votes
1answer
36 views

Is there a way to tell if Magento's controller is being overridden and if so where?

I'm currently using Magento 1.7! In the Admin Panel under System-->Permissions-->Users I want to alter data inside the User Info tab once I click Save User. From what I know about Magento: app/code/...
4
votes
2answers
1k views

Magento 2: add admin page content title in layout xml?

I noticed that you can set the page title in the layout xml per how to modify page title. but it's not working in the admin - if I want to change the admin page title, in the Controller, this works: ...
0
votes
1answer
350 views

Override Magento Adminhtml Controller

I'm trying to override the Product Review Controller from Magento Backend, however the new controller is never called, I followed the exact steps on this post, however it does not seem to work, and ...
2
votes
2answers
1k views

Error While Compiling Magento 2 admin page module

I'm getting error while compiling the Magento 2 admin module. The error which I'm getting is Fatal error: Class Tutorial\SimpleNews\Controller\Adminhtml\News contains 1 abstract method and must ...
0
votes
2answers
34 views

Form to Controller Help!

I have the following, (Note the capital and non capital letters.) In app/design/adminhtml/default/default/template/customertab/action.phtml <form action="&lt;?php echo $this-&gt;getUrl('...
0
votes
3answers
240 views

Custom Controller URL Admin Panel

I need the correct URL for my form action! In app/design/adminhtml/default/default/template/customertab/action.phtml This is file code, Is there any things I'm missing? <form action="<?php ...
4
votes
3answers
2k views

What is the purpose of isAllowed method and when It is called in Magento 2?

I have seen that below method. protected function _isAllowed() { return $this->_authorization->isAllowed('Custom_Module::moduleslider_banners'); } What exactly it will do? Will it check ...
0
votes
1answer
43 views

Contents are showing above the header

I have just created a new module and in controller echo some text so it is showing above the header how i can wrap it under the header as the other module showd: Following is my Controller code: ...
5
votes
4answers
3k views

Magento 2 - Backend custom module 404 error

I'm trying to create my custom module in the back-end, I followed a lot of tutorials, but I continue to get 404 error when I try to access to my controller. The only thing that work fine is the menu ...
1
vote
2answers
937 views

Get frontName of admin from app/etc/local.xml

<admin> <routers> <adminhtml> <args> <frontName><![CDATA[admin]]></frontName> </...
1
vote
3answers
3k views

Custom Admin Module Grid - Header Text Not Showing but Grid Showing

I am creating a custom backend module that has a grid. All the functionality is working fine except that the content-header portion is not showing. this means that the "add entry" button also does not ...
5
votes
1answer
5k views

get Admin controller URL in magento 2

Here is my Directory structure of controller file in Magento 2 - app/code/Namespace/Modulename/Controller/Adminhtml/Blacklist/Index.php In Index.php i write the below code - namespace Mynamespace\...
1
vote
1answer
27 views

Can not called my CreateController while edit an order from backend

I want to change in SaveAction() of Mage_Adminhtml_Sales_Order_CreateController. So for this I have make changes in config.xml like below : <admin> <routers> <adminhtml>...
0
votes
1answer
102 views

Magento 2.1 :- “Node ”argument" required for this type. When run admin controller

When I run admin controller for test/index/index. I got below error. a:4:{i:0;s:39:"Node "argument" required for this type.";i:1;s:4679:"#0 mage2/var/generation/Magento/Framework/Data/Argument/...
11
votes
3answers
5k views

how to save custom field in custom database table while editing product from back-end?

I have created a custom module to display custom tab on product form in back-end. I used this solution. Now on tab i am adding custom fields to save in custom database table. say <input type="...
0
votes
0answers
43 views

Magento 2 Custom Module New Controller Issue [duplicate]

I have created listing & it's working fine with database. Now i'm trying to create "Add Form" for that. {folder path}\magento2\app\code\Custom\Module\Controller\Adminhtml\Posts\NewAction.php ...
4
votes
2answers
917 views

I created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error? [duplicate]

Recoverable Error: Argument 1 passed to Webkul\Grid\Controller\Adminhtml\Grid\Index::__construct() must be an instance of Magento\Backend\App\Action\Context, instance of Magento\Framework\...
0
votes
2answers
1k views

Extending magento sales order controller not working

I'm trying to extend the mage order controller, but i'm getting a 404 error. As far as i can tell my custom ordercontroller is not being included. I've read multiple Q&A's on stackexchange but i ...
3
votes
2answers
1k views

Magento - include multiple external libraries to Admin Controller actions

I am working on import price of products using xls, xlsx, ods and csv files. For that i need to read these file, i had use seperate external library files to read those files. It works well in my ...
11
votes
2answers
501 views

Public actions in admin controllers

I've discovered that in the class \Magento\Backend\App\AbstractAction (the ancestor of every admin controller action) there is a member called _publicActions that is used in the validation of the ...
2
votes
2answers
2k views

Magento 2 - Got Error in Adminhtml Controller

I am trying to create custom module in magento2. I got below error while click on the menu in admin. it seems my admin controller not configured properly. Can anyone help me in this issue. Fatal ...