All Questions

0
votes
1answer
18 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\...
1
vote
0answers
36 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/...
1
vote
1answer
46 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
17 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 ...
4
votes
0answers
38 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 ...
0
votes
1answer
93 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: ...
2
votes
2answers
59 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
32 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 ...
0
votes
1answer
48 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
380 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
111 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
185 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
358 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 ...
0
votes
0answers
18 views

2 Different keys are being genereated, Admin Grid action column-> edit link and page created after clicking save and continue butotton

I have created a Module, I created an admin grid and crud operations. All are working fine when I disabled secret key form store configuration. In show secret key in url my Edit action and Delete ...
4
votes
1answer
592 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-...
0
votes
2answers
61 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
635 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 ...
1
vote
1answer
655 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
707 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
58 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
197 views

Magento 2 Programmatically set theme for specific stores

Programmatically How can set a theme for specific stores in Magento 2.1
1
vote
5answers
1k 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
410 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
94 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 = $...
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
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/...
1
vote
1answer
366 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; ...
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\...
0
votes
2answers
234 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
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" ?&...
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
480 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 ...
3
votes
1answer
645 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
0answers
445 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). ...
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: ...
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 ...
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 ...
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 ...
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\...
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
920 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\...
11
votes
2answers
502 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 ...
0
votes
1answer
219 views

Invalid product id. Should be numeric value greater than 0

I have created custom button on Adminhtml Product edit page and it's showing fine. When I hit the button it's redirecting to Product List page and throwing Error. Error: Invalid product id. Should ...
1
vote
2answers
2k views

adding new admin page to backend(magento 2)

I can get into the execute() function if I do not run the construct function. but I cannot find the bug in my __construct function. The file is \app\code\Cleargo\Contactus\Controller\Adminhtml\Grid\...
1
vote
2answers
8k views

Magento 2: how to redirect from an admin controller

In Magento 1, we were able to do the following directly in a controller action method : $this->_redirect('*/*/index'); Or in a more generic way: $this->_redirect('adminhtml/controller/action')...