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
2 answers
66 views

Magento 2 :: Admin Custom Form values stored with double quotes issue

I have created a custom admin form using a UI component and added a multi-select shipping method field. I've successfully retrieved the selected values in an array and stored them as a string in my ...
IntraPersonalLearner's user avatar
0 votes
1 answer
38 views

Magento 2.4 Admin Custom Controller Check If User Logged In and Redirect to Login If Not

In an Admin Controller Class, How do I check if the admin user is logged in, then redirect to the login page if not logged in, then return to the previous controller after login? A cut down version of ...
Fox's user avatar
  • 191
0 votes
1 answer
55 views

How to remove the Deprecated property of __construct from Abstract Class using overriding or any other way

Error main.ERROR: Deprecated Functionality: Creation of dynamic property Magiccart\Magicproduct\Controller\Adminhtml\Product\Index\Interceptor::$_resultRedirectFactory is deprecated in vendor/...
Sheri's user avatar
  • 140
0 votes
1 answer
134 views

magento 2 admin create and download csv file and loading problem

Please loading issue solve. I try to reload or redirect but that is not working. $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT); $resultRedirect->...
Rubel Parvaz's user avatar
0 votes
1 answer
118 views

A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later. Ajax call

I have a problem here. I use Ajax call to send data to controller. define([ 'jquery', 'Magento_Ui/js/form/components/button' ], function($, button){ 'use strict'; return button.extend(...
Nghia Hoang Trong's user avatar
0 votes
3 answers
37 views

Invaild security or form key, please refresh your page

i hit the url backendnotification/index/index this error show what is wrong route and controller this is my route code <router id="admin"> <route id="...
Alok Tiwari's user avatar
0 votes
1 answer
35 views

Admin panel sidebar links doesn't work in production mode

I have an issue while i switch my magento website in production mode, The website is finally ready to be set but now i face a problem after i've installed many modules and packages, i don't know why ...
arkoos's user avatar
  • 1
0 votes
1 answer
133 views

Observer redirect to admin controller not working in https

here is the code: events.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
hkguile's user avatar
  • 2,221
0 votes
1 answer
34 views

I am redirecting in dashboard when perform save product in magento2.4.5

I have increased max_input_vars size very big still i am getting 'Invalid Form Key. Please refresh the page.' , when product save in backend. Even i am doing save any thing in backend i am redirecting ...
Ansar Husain's user avatar
  • 3,409
0 votes
1 answer
28 views

1 exception(s): Exception #0 (ReflectionException): Class "MyVendor\SubOrder\Controller\Adminhtml\Order\View\Interceptor" does not exist

I am creating a suborder view page in BackOffice that retrieves data from the customized table. However, I received an error on above topic when I click the view button in my customized grid. Did I ...
hill2011's user avatar
0 votes
1 answer
164 views

How to redirect to the form with entered data if a form content have any error in magento 2 admin custom form?

I have a custom admin form, After click save button i am checking some unique url in my save controller. If the url is not unique, i want to pass an error message and redirected to the form with filed ...
Mujahidh's user avatar
  • 2,791
0 votes
0 answers
166 views

How we can call multiple blocks in a single controller?

Is there a way to call multiple blocks in a single controller in Magento 2? The below code only populate the single grid but I want it to return two blocks. public function execute() { /* @...
Mehar's user avatar
  • 205
0 votes
1 answer
136 views

Capture payment online after create quote programmatically

I need programmatically to capture payment online using the PayPal Payflowpro method and credit card details. Also, create an order number and invoice after creating a quote then setting quote_id in ...
mido's user avatar
  • 59
0 votes
1 answer
95 views

Custom link in order grid not able to access custom controller but forward to order details page

I've successfully create a column in order grid page. The sales_order_grid.xml <?xml version="1.0" encoding="UTF-8"?> <listing xmlns:xsi="http://www.w3.org/2001/...
hkguile's user avatar
  • 2,221
0 votes
1 answer
162 views

Get Controller of each request

What I want just to print out name of each controller called at a specific request? So How can I do that any help thanks in advance?
Muhammad Ali's user avatar
1 vote
0 answers
114 views

How to link a custom button to a controller file in magento form

So I have a custom module where I have custom form and custom product grid section. So I have created some custom button on both pages through UI components. Now I want to link these buttons with a ...
Ashish M's user avatar
0 votes
1 answer
26 views

Magento 1: Can't override Enterprise/GiftCardAccount/controllers/Adminhtml/GiftcardaccountController.php

I can't override the controller inside of the Enterprise/GiftCardAccount/controllers/Adminhtml/ folder <config> ... <admin> <routers> <adminhtml> <...
Alberto Garcia's user avatar
0 votes
1 answer
1k views

Magento 2 Add Button in Edit Product page and land back there after POST request

So, as the title says, I want to add an Admin button in the Edit Product Admin page. That button, when pressed, will call the respective controller of a URL, sending along the product id, the ...
Noob Doob's user avatar
  • 127
0 votes
0 answers
227 views

Magento 2 Admin Menu buttons (UiComponent buttons) behaviour

Question What do I need to setup a Button's behaviour, or is there CRUD built-in Magento 2 behaviour when I do not specify a Controller? This is The tutorial article I am following. I found the ...
CvRChameleon's user avatar
0 votes
1 answer
110 views

Magento 2 custom dashboard Page

I want to show a completely custom dashboard. I have a controller for that. I just want to show this page when Admin login. I don't want to show the default Magento dashboard controller I want my ...
Ramesh KR's user avatar
  • 866
0 votes
1 answer
298 views

Magento 2 : Acl admin controller

I can see below code in file use Magento\Backend\App\Action; /** * Abstract assignment controller */ abstract class Assignment extends Action { /** * Authorization level of a basic admin ...
devhs's user avatar
  • 497
1 vote
2 answers
400 views

How can i override abstract class protected function

I want to override abstract class Magento\Sales\Controller\Adminhtml\Order\Create of the below method protected function _processActionData($action = null){ } I have tried using preference but it ...
Chirag Patel's user avatar
  • 6,116
0 votes
0 answers
463 views

Magento 2 how to redirect backend controller to previous page?

I'm trying to redirect a controller that is executed in Order Detail. If I end the controller returning redirect like this, it throws an error: return $resultRedirect; If I end the controller with ...
Oscar Vazquez's user avatar
0 votes
1 answer
139 views

check admin loggedIn on frontend magento 2

i have tried through this method public function isAdmin() { $this->_coreSession->start(); echo $this->_coreSession->getMessage(); echo 'session test4'; ...
aich.khalid's user avatar
0 votes
1 answer
56 views

how to check admin loggedin or not on frontend magento 2 [duplicate]

how to check admin loggedIn or not on front-end magento 2 .I have tried this class BackendAuthUserLoginSuccess implements ObserverInterface { const DEFAULT_SESSION_NAME_OF_FRONTEND = 'PHPSESSID'; ...
aich.khalid's user avatar
0 votes
1 answer
351 views

how to get magento admin users from magento 1.9

I want to get magento admin users and assign them a mobile number, from each particular agent panel, agent can able make a call from that number.
vinaysirige's user avatar
0 votes
1 answer
119 views

Magento 2 admin controller is not working

Here am added a admin controller, here is my code etc/adminhtml/routes.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Praveen Negimani's user avatar
0 votes
2 answers
2k views

save admin form and redirect back url in magento 2.3

I have create admin sales grid. All is working fine. And i have added one link in order view page. This link click redirect custom admin form. And Finally i want to save custom admin form. And ...
Mohit Patel's user avatar
  • 3,750
1 vote
0 answers
170 views

Magento 2 add text input to massaction from dropdown

In magento 1, if I wanted to add a text input to send a custom value with my massaction to my controller, I would do something like: $this->getMassactionBlock()->addItem('add_ship_method', array(...
joeybab3's user avatar
  • 378
0 votes
2 answers
2k views

Type Error occurred when creating object

I am having the massaction "delete" in the ui_component and it is then process by a controller MassDelete in my adminhtml folder. like this: <?php namespace Apriljune\Testimonial\...
Shoaib Fareed's user avatar
1 vote
1 answer
1k views

How To Add Fixed Filter In Custom Admin Block Grid in Magento 2?

Here is my custom grid i wan to show only those data that status is paid but now the data present with paid and unpaid both . how can i set default filter to these custom block grid... here is my ...
Jay Parmar's user avatar
1 vote
0 answers
625 views

Magento 2 override admin Controller Address Save.php

How to override admin controller address save.php I am using this code - di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
sumeet bajaj's user avatar
  • 1,286
3 votes
5 answers
6k views

Custom Module Controller: Invalid security or form key. Please refresh the page

I have a custom module with an admin controller, but when I try to access from the administration page I get the following error: My controller is in Controller/Adminhtml/Login/Index.php class Index ...
Miguel's user avatar
  • 559
0 votes
1 answer
94 views

Find backoffice controller

I have a javascript call to this url : https://mysite/admin/admin/export/export/key/b7c4bdb5a1b9f5147f498741adc99/entity/catalog_product/file_format/csv From this url how can I find where is located ...
Clong's user avatar
  • 3
1 vote
1 answer
465 views

Magento 2 admin Ajax call failed bad request

I'm using custom js in Product Add/Edit page of magento 2 admin. I need to make a ajax call when the product save button clicked. I used the below code. require(['jquery', 'domReady!'], function ($) {...
Ramesh KR's user avatar
  • 866
1 vote
2 answers
1k views

Magento 2 Admin controller is not working 404 error

I don't why my admin controller is not working, I have checked it and everything seems to be ok. This is my code: etc/adminhtml/routes.xml <?xml version="1.0"?> <config xmlns:xsi="http://...
Oscar Vazquez's user avatar
0 votes
1 answer
154 views

How to collect customer data who has added the product to wishlist?

I have a requirement that is collect customers data like wishlist, address and send them to another server using SFTP. These all should be programmatically. Could anyone please guide me on this? ...
Mohammad's user avatar
0 votes
0 answers
323 views

My ajax request isn't working properly in phtml

vendor\module_name\view\adminhtml\templates\tab\customer_view.phtml <?php $buttonTitle = __('Invalidate Quotes');?> <div class="fieldset-wrapper customer-information"> <div ...
jibin george's user avatar
1 vote
1 answer
702 views

Magento 2: Abstract Controller class is not being override

I am trying to override an abstract class vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php using di.xml but it is not working. I need to do some changes in method protected function ...
vartika sharma's user avatar
0 votes
1 answer
1k views

How to override product attribute Save.php controller using modulein magento 2?

I am trying to create a module in which I am facing some issues to override Save.php Controller as well as save that data in the new table. here is my updated di.xml code, but now after click on save,...
Sarvesh Patel's user avatar
0 votes
1 answer
638 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/...
Oscar Vazquez's user avatar
2 votes
3 answers
857 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.
GenZ Dev's user avatar
  • 590
3 votes
1 answer
1k 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 ...
TheOkayCoder's user avatar
1 vote
2 answers
738 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\...
Khushbu's user avatar
  • 825
3 votes
1 answer
785 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/...
Emipro Technologies Pvt. Ltd.'s user avatar
0 votes
1 answer
372 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 ...
Morgan Smith's user avatar
1 vote
1 answer
702 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 ...
Asad Ullah's user avatar
  • 1,461
3 votes
0 answers
54 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 ...
Asad Ullah's user avatar
  • 1,461
4 votes
0 answers
41 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 ...
Asad Ullah's user avatar
  • 1,461
1 vote
1 answer
127 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/...
Radhu's user avatar
  • 169