The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [admin-controller]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

Magento 2 Custom Admin module 404 Not Found

I have been struggling with this error all day, I have tried all the solutions on Internet, but it keeps showing 404 Error when I click the link on my custom menu. Here is my code /app/code/Vendor/...
0
votes
0answers
16 views

How to have inline edit for Image in Magento 2 admin grid?

I am currently having inline edit for text in the admin grid but I want to have inline edit for the image in the grid. Is it possible? I used editor type text for input text. For image what should I ...
2
votes
3answers
114 views

Magento 2: How to get current category id in admin controller

I have made a custom button on category edit page in admin. The button redirects to custom admin controller. I need to fetch the current category id in the controller.
3
votes
1answer
144 views

How can I make my controller return JSON back to my template PHTML

Controller: <?php namespace MyCompany\ExampleAdminNewPage\Controller\Adminhtml\Product; use Magento\Framework\App\Action\Context; use Magento\Framework\Controller\ResultFactory; class Product ...
0
votes
2answers
38 views

How to create controller without creating menu in Adminhtml Magento 2

I have referred below Article to display button in my Configuration page. https://magecomp.com/blog/add-a-button-in-magento-2-stores-configuration-with-custom-action/ In file app\code\Vendor\...
2
votes
0answers
81 views

Magento 2 - How to pass parameter from menu.xml

Is there any way to pass a parameter to controller from menu.xml file? Actual URL : http://127.0.0.1/mg231/admin/vendor/module/index/key/...
0
votes
1answer
93 views

Can't access admin after update Magento 2.3.1

I recently updated my Magento 2.3.0 to 2.3.1, and my site works, but I when I try to go to my admin url I get a 504 error. I have tried clearing my cache, and I tried following advice to clear the ...
1
vote
1answer
62 views

Can we redirect controller to another controller in another custom function rather execute function?

Can we redirect controller to another controller in such a way that previous controller continue its working in its execute method and next controller works render the layout at a same time? and after ...
0
votes
0answers
20 views

Magento 2.3 Admin product Detail show as tabs

Is there a extension that make the Admin Product detail showing in tabs instead of accordion? Liz
3
votes
0answers
51 views

Extension works fine on local system but on live instance it gives me error

Can someone please give me some detail about my issue. I am duplicating categories along with the product on my local system it works fine although it takes little more time but works fine on my live ...
0
votes
0answers
83 views

How to add massaction in product grid in magento 1

What is the easiest way to add add mass action to product grid using only observer and controller(no block). I would like to see a simple example because it is the first time I create it.
4
votes
0answers
39 views

System stuck on a controller on live instance does not return any thing nor redirect

I am duplicating the category tree with products works fine on my system while checking on live instance. scenario Duplicate category and subcategory but not products works fine. Duplicate category ...
1
vote
1answer
21 views

Magento 1.9 custom module for managing admin users in different role

Am working on a custom module for managing admin users in a custom role. Just finished the grid section. I need to edit the listed users, also a add form. I just tried by overriding the 'Mage/...
0
votes
1answer
133 views

Magento2 Admin UI Component: On fileUploader ajax completion in ui component, how can I reload the page it is on?

I have a grid that just shows a collection of a specific table. below is a file upload component that I want to use for CSV upload, that will replace all old collection. Image reference is below: ...
0
votes
0answers
30 views

Magento 1.9 admin menu is going to 404!

I am using custom module to getting tax report. It is working fine on demo site. Below is the etc/config.xml: <?xml version="1.0" ?> <config> <modules> <DS_News> ...
0
votes
0answers
34 views

Custom action won't work?

My Customized controller seems not work. Added new method which suppose to update some values in table, here is my method: public function reorderAction() { Mage::log('=> test',true,'...
2
votes
2answers
76 views

Grid with multiple Resource Models

I'm trying to use one grid for multiple ResourceModels, so far I've got one grid working fine. I can load the grid up fine using http:{}/admin/grid/grid/ However when i create a new route to load ...
0
votes
0answers
57 views

Show Model PoPuP after executing massAction in Magento 2?

I have a custom massAction after executing the function I need to show the model popup. In my case, I am sending the multiple requests to web service and storing the array of messages if I use below ...
1
vote
1answer
375 views

call block from controller via ajax

I call controller function from phtml via ajax, it calls controller function Now i am trying to call block function in controller it is not working Controller code public function __construct( ...
0
votes
2answers
171 views

Registry not working in magento 2

I need to call the controller function from block . in magento 2 i use the registry. In my block i wrote public function __construct( Template\Context $context, \Magento\Catalog\...
0
votes
1answer
169 views

override Magento\Sales\Controller\Adminhtml\Order\Create\Save.php file

How to override Magento\Sales\Controller\Adminhtml\Order\Create\Save.php the file can you please help me out?
0
votes
1answer
55 views

Magento 2 Custom admin module not working

I have created my custom module for order export and this is working fine in my magento 2.5 and magento 2.6 but this OR any other module is installed in my magento 2.2 it will not show in admin and ...
2
votes
2answers
643 views

Fatal error: Uncaught Error: Call to a member function isLoggedIn() on null in

di.xml <preference for="Magento\Catalog\Controller\Adminhtml\Category\Save" type="Modulename\Complexgrd\Controller\Adminhtml\Category\Save" /> Save.php <?php namespace Modulename\...
3
votes
2answers
137 views

Controller function not working after overwrite afterExecute : M2

Di.xml <type name="Magento\Catalog\Controller\Adminhtml\Category\Save"> <plugin name="mymodule" type="Module\Name\Plugin\Controller\Adminhtml\Category\Save"/> </type> ...
0
votes
1answer
244 views

How to get selected Order Ids in block from Sales Order Grid? Magento2

I want to generate PDF of selected orders, Rest of the functionality is complete just wanted to get selected Ids from sales order grid. For now I am getting full list of Orders on clicking my custom ...
0
votes
1answer
459 views

How to create custom pdf on controller action using TCPDF in magento 2

I have added TCPDF as follows: Downloaded TCPDF library from https://github.com/tecnickcom/tcpdf and place at magento2.0/lib/internal/TCPDF Renamed tcpdf.php to TCPDF.php Opened TCPDF.php and change ...
1
vote
1answer
2k views

magento 2 redirect url with parameters from controller

I am trying to redirect to a different controller from one controller . I also want to set an Url parameter along with the redirect. But this is throwing me an error Uncaught Error: Call to ...
4
votes
2answers
531 views

Magento 225 :Notice: Array to string conversion

When I try to create a new record in my custom module I get the below mentioned error Something went wrong while saving the item.Notice: Array to string conversion in /opt/lampp/htdocs/...
4
votes
1answer
745 views

Magento 2 Blank Layout Page

I tried to create a new tab in customer edit backend. First i create the app/code/Namespace/Point/view/adminhtml/layout/customer_index_edit.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
2
votes
1answer
274 views

Magento2 make simple afterSave action plugin of custom module

I am trying to create afterSave plugin for my admin form save action controller of my custom module. The purpose of this is to save some data into second table once all data completely save in first ...
0
votes
2answers
67 views

How to pass value from controller to /resourceModel/Collection.php class

There are two table t1 and t2 t1 id, name 1, abc 2, pqr t2 id, t1_id, phone 1 , 1 , 7894561230 2, 1 , 7894645125 3, 2, 7445582145 I am having two grids, grid 1 showing the first table. Now if i ...
2
votes
1answer
829 views

Magento 2 | Add Admin Configuration Button Action

I need to call a method from an admin configuration button. This is my simple custom module. The button appear on admin but notthing appen on click. No log is write. I cannot understand what I am ...
0
votes
2answers
823 views

Retrieve Values passed in Ajax Magento 1.9

After making the ajax call, i try to recover the values, but returns null this is function inside controller public function checkAction() { # Retrieve value //$checkbox = Mage::app()-&...
1
vote
1answer
36 views

Can I make separate controller for AJAX actions? (Magento 1.x)

I have my custom module and everything works fine, but I would like to create separately controller for AJAX actions (AjaxController). Currently I Have only IndexController. Everytime I get: {"error":...
2
votes
0answers
356 views

Magento 2 adminhtml layout.xml not loading

The Controller File works fine, die('dasdsa') works. But i am not getting any result on the Backend Page except the Title Change within the Controller. I Guess it's just something simple :X Classy/...
1
vote
1answer
809 views

Magento 2.2.5: Overriding Admin Controller sales/order

I need to override Admin sales/order/index controller, but still getting 404. Below the Steps I take to override - Created My Custom Module app/code/A2bizz/Order/registration.php <?php \Magento\...
0
votes
2answers
819 views

Fatal error: Uncaught Error: Call to undefined method getDirectoryRead()

I have a controller that works and does what i need it to do if i manually add a path like: $mediaImages = '/magento/pub/media/images/'; But i cant get the DirectoryList injection to work, it returns ...
1
vote
0answers
65 views

Code refactor : replace model with repository

I am trying to refactor code of app/code/Magento/Cms/Controller/Adminhtml/Page/Delete.php by replacing \Magento\Cms\Model\Page with \Magento\Cms\Api\PageRepositoryInterface and removing direct use of ...
0
votes
1answer
320 views

Magento 2 Programmatically set theme for specific stores

Programmatically How can set a theme for specific stores in Magento 2.1
2
votes
5answers
2k views

“Visible Section not found” at backend login in Magento 2

When I switch the store to a specific domain https:// example.com (secure & unsecure), I get the error "Visible Section not found" when trying to log into the backend. The funny thing: as soon ...
0
votes
1answer
31 views

Extending Core Controller without Custom Module

I want to extend a core controller: app\code\core\Mage\Adminhtml\controllers\CustomerController.php I simply want to customise the one of the functions. I have created the following file: app\code\...
4
votes
1answer
66 views

Add order status while placing order from admin Magento 1

I want to add a custom dropdown for the order status in the create an order page from admin. Admin can choose the order status while placing the order. Please see attached screenshot!!! Or Can i set ...
0
votes
1answer
517 views

Admin form action to another admin controller can not reach

In Magento2, I create a form by phtml file in admin, but when I submit it, it always redirect to admin homepage, not reach another admin controller, how to fix it? I guess the problem is in the ...
1
vote
0answers
105 views

Magento2 backend Reorder issue

I need to display the Order custom attribute values in magento2 admin re-order page. I tried the code like $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $session = $...
3
votes
2answers
227 views

predispatch on a adminthml controller

I am using magento 1.7. I would like to have a event before the call of this method Mage_Adminhtml_Sales_Order_CreateController save. I tried to do it like this : Config.xml : <adminhtml> ...
1
vote
2answers
115 views

Class vendorname\modulename\Model\ResourceModel\Wishlistnotifcation\CollectionFactory does not exist

I am creating admin grid and show data on admin grid using ui component. i have created model resource model and collection. view\adminhtml\layout\notification_notification_notification.xml <?xml ...
1
vote
2answers
102 views

About Admin Side I have a template file in which I have a form submission

In the admin side, I have a template file in which I have a form submission. On form submission, an action would be executed, but it is redirecting to dashboard. can anyone have any idea, how to ...
1
vote
1answer
234 views

Admin user save controller not called

I am trying to add an image to each admin user. I have added a form field with a plugin: namespace Vendor\UserImage\Plugin\Block\Adminhtml\User\Edit\Tab; class Main { /** * Get form HTML * ...
0
votes
1answer
233 views

Magento 2 admin user role not custom menu

Hi my custom menu not showing admin user role. etc/adminhtml/menu.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
1
vote
3answers
2k views

Magento 2: Error 404 on ajax request

I checked this and built a Controller that executes an ajax request sent on adminhtml through a button, but I get an error 404 on my console. POST http://myurl/system_config/customAjax/key/...