Skip to main content
Share Your Experience: Take the 2024 Developer Survey
4 votes
Accepted

Magento 2: Fatal error: Call to a member function getUsername() on null in

It seems you extends \Magento\Framework\App\Action\Action class in admin controller. Instead extend from \Magento\Backend\App\Action class, so it will redirect you to login page instead of throwing ...
Jaimin Parikh's user avatar
3 votes

Uncaught ReferenceError: jQuery is not defined

You are not loading jQuery properly, check your source code & see the order you load your scripts https://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/
Raul Sanchez's user avatar
  • 3,115
3 votes
Accepted

Magento 2 console script dealing with area code not set / area code already set error

It seems that when the class Magento\Sales\Model\Service\InvoiceService is injected, it calls some functions that cause the error. Since it doesn't happen when you use the ObjectManager directly, I ...
tmcgrath92's user avatar
3 votes
Accepted

Magento 2.3 - Uncaught TypeError: Cannot read property 'version' of undefined

Updated jquery-ui from 1.10 to 1.12 now the version issue has been resolved.
Ejilarasan J's user avatar
3 votes
Accepted

magento 2.4 difference between input argument and option in console commands

Options have a flag. Arguments have no flag. bin/magento‌ do:something‌ --email="[email protected]" do:something = Argument --email = Option (accept the anwser if solved your doubt)
Leandro Ritter's user avatar
3 votes

Magento2: AddFotoramaVideoEvents is not a function on PDP?

Even if the Magento ProductVideo module is enabled but the gallery.phtml block that it adds is moved or removed, you will get this error. Kind of a silly dependency, I feel like this call to ...
Pratik Mehta's user avatar
2 votes

Magento2 : Getting error in console customer-data.js:86

It turns out that customer-data.js uses the localStorage to store a variety of stuff (probably for caching purposes). This means that when a module (or Magento) updates, you'd better make sure to ...
Amit Naraniwal's user avatar
2 votes
Accepted

Checkout page keeps loading continously in magento 2.2.4

jquery version 3.3.* is not compatible to Magento 2.2.4, So just use jquery 1.11.2 to resolve this error
Devidas's user avatar
  • 3,358
2 votes
Accepted

Magento 2 Error in browser console Expected to start loader but did not find one in the dom

I was facing add to cart issue after products loaded from ajax. I simply called catalogAddToCart function in my js success function and it worked. Please try this, hope it will resolve your issue. ...
Shoaib Munir's user avatar
  • 9,482
2 votes
Accepted

Uncaught ReferenceError: jQuery is not defined

you error message clearly indicate that you jQuery variable is not defined. simply change this var $wk_jq = jQuery.noConflict(); to var $wk_jq = $.noConflict();
Qaisar Satti's user avatar
  • 32.5k
1 vote

Magento 2.2.5 - JS errors in console only on Hard Fresh(Ctrl+F5)

I have implement flexslider feature by the below way, Try this, First Step : Add the source files which is required for flexslider implementation. Add jquery.flexslider.js to the below path app/...
Prathap Gunasekaran's user avatar
1 vote

TypeError: stepNavigator.setHash is not a function in checkout Magento 2

Do you have added your own design or made a copy of the exist Luma theme? In my case was this the problem. Following JS was changed in the original path: vendor/magento/module-checkout/view/frontend/...
oha's user avatar
  • 21
1 vote

Color Picker error in the console

Add JavaScript color picker library in your layout : <?xml version="1.0" encoding="UTF-8"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:...
Rohan Hapani's user avatar
  • 17.4k
1 vote

Magento 2 Console Error Uncaught TypeError

Hello friends I found the issue. jquery was conflicting When I check in console jQuery was undefined I have checked using require but jquery was not worked. require(['jquery'],function($){ console....
Bhavesh Prajapati's user avatar
1 vote

Does magento 2 have built in timing component like symfony stopwatch?

Yes. See \Magento\Framework\Profiler and \Magento\Framework\Profiler\Driver\Standard\Stat classes
KAndy's user avatar
  • 20.9k
1 vote
Accepted

Magento EE 1.14.4.4 Upgrade - Console error in Checkout Page. "decorateTable is not defined"

I have found the issue and fix finally. Below are the details We have faced some console errors and button click issues in our site after upgrading to 1.14.4.4. These errors break place order ...
Agnes's user avatar
  • 787
1 vote
Accepted

Magento 2 Product detail page tab not working

Override tabs.js in your theme or module using requirejs and use $.each(this.collapsibles, function () { $(this).on('beforeOpen', function () { self.collapsibles.not(this)....
Manish Chaubey's user avatar
1 vote

Magento2 Cart and Checkout page is not working

I also had the same issues, actually i had added some third party extension and that was getting conflicted so i have removed that and i have run the command. php bin/magento setup:upgrade php bin/...
Hemant Kumar's user avatar
1 vote
Accepted

Cannot read property 'click' of undefined In magento 2 phtml file

Add dependency 'domReady!'. <script> require(['jquery', 'jquery/ui', 'domReady!'], function($){ $('.swatch-option').get(0).click(); alert('123'); ...
Eugene Kapelko's user avatar
1 vote
Accepted

Custom Console command creation error in Magento 2

Your Argument Names are wrong, they should not be with space. for your case you have used const INPUT_KEY_REFERENCE = 'Amount has been credited'; it should be like this const ...
Shawkat Alam's user avatar
1 vote
Accepted

Magento2: AddFotoramaVideoEvents is not a function on PDP?

Over ride below xml with below content: When overriding the catalog_product_view.xml, it seems that the changes in ProductVideo are no longer applied – so the line has to be added like below app/code/...
Pramod Kharade's user avatar
1 vote

Uncaught SyntaxError: Unexpected token } in JSON at position 199

Try clearing browser cache if you haven't already, I've had this a few times when I forgot to clear it. Also make sure you have un-done the steps you took to add it, so remove the related JS from the ...
Ben Crook's user avatar
  • 15.7k
1 vote

Magento2: delete product from cli

To delete a product from CLI, you need to set the area to ADMIN_HTML and set the isSecureArea to true in the registry. This is because of this check in vendor/magento/framework/Model/ActionValidator/...
Tschallacka's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible