11

Copy MAGENTO_ROOT/vendor/magento/magento2-base/lib/web/mage/validation.js into app/design/frontend/THEME_ROOT/web/mage/ then delete (start in line 1956) if (firstActive.length) { $('html, body').animate({ scrollTop: firstActive.offset().top }); firstActive.focus(); } ...


10

Go to Stores -> Inventory -> Stocks (admin/inventory/stock/edit/stock_id/1/) and enable it for all websites, then hit save. (See also https://community.magento.com/t5/Magento-2-x-Version-Upgrades/Magento-update-to-2-3-compilation-errors/td-p/114524)


9

open file vendor/magento/module-payment/Helper/data.php at line number 268 put this line $data['active'] = 1; if you dont want to change in the core file than you need to override that file follow the below code Go to Vendor/Extension/etc/di.xml And Write below code into di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...


8

Well that's a -- choice? -- the Magento engineers made. This isn't an answer, but it looks like that function accepts a callback that's meant to load cached data. The callback checks if there's currently a lock in place. If not, it puts a lock in place, loads the data, and then releases the lock. If there is a block in place, it sleeps for 100,000 ...


8

The reason SVG's are disabled in Magento 2 by default, is for security reasons such as stored XSS. And I would recommend that you leave them disabled atleast for now until we get better sanitization for them. You can see an example of this in APPSEC-1673, where they removed SVGs in the favicon https://magento.com/security/patches/magento-2016-and-219-...


7

lockedLoadData mechanism needs to decrease the load on the server. Previously when configuration cache is cleaned on hi-loaded sites all client has generated the same information that significantly increases cpu/io load. With lockedLoadData only one client will generate cache and others will wait for it. More details about how it works. The first ...


6

You can create a template file in your theme this core file : vendor/magento/module-sales/view/frontend/templates/email/shipment/track.phtml and add condition before this function getTracksCollection you can add condition like this <?php if ($_shipment && $_order): ?> So that issue will fixed for magento 2.3.1


6

Please check with below url - first you need create you own module in magento 2 (you can search in google) , in ibnab we created extension with name Ibnab_CloudZoomy , Magento 2 system use the Block Magento\Catalog\Block\Product\View\Gallery inside Magento_Catalog Module , and if you go to vendor/magento/module-catalog/view/frontend/layout/...


6

As far as I know, there are two main ways: If using command line composer, you can follow this guide: https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html https://devdocs.magento.com/guides/v2.3/comp-mgr/upgrader/upgrade-start.html (I haven't tried yet with Admin) With the command line and Open source version, on your local machine, you ...


5

Install Data Migration Tool 1) Check your Magento 2 version :- sudo php bin/magento --version 2) Install Data Migration Tool from repo.magento.com :- composer config repositories.magento composer https://repo.magento.com composer require magento/data-migration-tool:<magento_version> 3) Configure Magento 2 ...


5

Looks like it's browser compatibility issue. Please try to check it in different browsers, also please update your current browser.


5

Here is a solution with a mixin to avoid overwriting the whole file: 1) app/design/frontend/[THEME_VENDOR]/[THEME_NAME]/Magento_Theme/requirejs-config.js var config = { config: { mixins: { 'mage/validation': { 'Magento_Theme/js/lib/mage/validation-mixin': true } } } }; 2) app/design/frontend/[...


5

You can use below link https://magento.stackexchange.com/a/128606/70565 I hope it's usefully for you.


5

NEW CODE FROM MAGENTO 2.3 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_types.xsd"> <type name="simple" isQty="true" /> <type name="virtual" isQty="true" /> </config> CHECK vendor\vendor\magento\module-catalog-inventory\etc\...


5

Magento generates files in following directories generated var pub/static pub/media/catalog/products/cache (In most cases this directory takes most of the storage) The no of files you have uploaded at start would surly increase after Magento generates all other files. You need to manually check directory sizes in each of the above listed directories by ...


5

Apparently it is a Magento bug. When comparing current schema to declared schema, constraints and other indexes are handled separately, but the existing index is not dropped before the new UNIQUE index is created. A workaround in this case is to drop or¹ rename the existing index in a separate script before performing the update. alter table wishlist ...


5

open OR overwrite below file and code <item name="svg" xsi:type="string">text/html</item> /vendor/magento/module-cms/etc/di.xml <type name="Magento\Cms\Model\Wysiwyg\Images\Storage"> <arguments> <argument name="extensions" xsi:type="array"> <item name="allowed" xsi:type="array"> ......


5

Open Below File /vendor/magento/module-cms/etc/di.xml Add your extension you want to allow <item name="svg" xsi:type="number">1</item> <argument name="extensions" xsi:type="array"> <item name="allowed" xsi:type="array"> <item name="jpg" xsi:type="number">1</item> <item name="jpeg" xsi:type="...


5

If you add this to your default.xml layout file. <referenceContainer name="main.content" htmlTag="main" htmlId="add-ID" htmlClass="new-class-name"/>


4

I have fixed the issue of product stock status update from Out of Stock to In Stock. Fixed the issue to override module-catalog-inventory/Model/Stock/StockItemRepository.php file. Follow below steps to create custom module for override StockItemRepository.php file and updated code. File path: magento/app/code/Vendor/UpdateStockStatus/registration.php &...


4

You can use the Magento framework methods instead of core php functions(AFAIK for the security reasons Magento discouraged these types of functions) For example, use Magento\Framework\Filesystem\Io\File; /** @var File */ private $file; /** * @param File $file */ public function __construct(File $...


4

I have also faced this same issue, although I still need to figure out what is the exact root cause and good solution, but I can suggest you a instant solution that I tried and worked for me. open pwa-studio/packages/venia-concept/.env MAGENTO_BUILDPACK_SECURE_HOST_ADD_UNIQUE_HASH=1 Uncomment MAGENTO_BUILDPACK_SECURE_HOST_SUBDOMAIN (remove #) and give a ...


4

TinyMCE disabled the ability to add them outside of the tags, so <style> tags are not valid XHTML, For this you will have to add style tags to the valid children configuration: valid_children : "+body[style]" So for magento you need to replace the code in lib/web/tiny_mce_4/tinymce.min.js: to : p("+ol[ul|ol],+ul[ul|ol]") with : p("+ol[ul|ol],+...


4

USE This Code private $request; public function __construct( ... \Magento\Framework\App\Request\Http $request ) { ... $this->request = $request; } Use This Condition ...... $moduleName = $this->request->getModuleName();// checkout $controller = $this->request->getControllerName();// cart $action = $this->request-&...


4

You have a couple of options. The simplest is using the Text content type to include the widget using the standard TinyMCE widget feature. Your other option is to create a new content type which wraps your widget in a Page Builder content type. Our Products content type does exactly this, it's just an interface for the Catalog Product List widget. products....


4

When Magento compiles (di compilation and static content deploy) it takes a lot of the already existing files in the app/code/ directory, or vendor directory, and produces a lot of generated and cached content in the generated/ and var/ directories. File caching will also generate a large number of files, try to cache using Redis instead if you don't ...


4

Use like below. protected $_categoryCollection; public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $categoryCollection, array $data = [] ) { $this->_categoryCollection = $categoryCollection; parent::__construct($context, $data); } public function ...


4

Please try replacing the following code for Function addAttachment() in Namespace/Modulename/Mail/Template/TransportBuilder.php. public function addAttachment($content, $fileName, $fileType){ $attachment = new \Zend\Mime\Part($content); $attachment->type = $fileType; $attachment->disposition = \Zend_Mime::...


4

Updated Answer Yes, can do implement a slider without using any extension For implement banner, you have to work at the theme level. Download OwlCarousel2 from https://owlcarousel2.github.io/OwlCarousel2/ and I have copied below files owl.carousel.min.css from https://github.com/OwlCarousel2/OwlCarousel2/blob/develop/dist/owl.carousel.js and owl....


4

This code for creating customers in Magento 2: $data = array( 'website_id' => 0, 'email' => 'sample@gmail.com', 'firstname' => 'Mac', 'lastname' => 'Hamon', 'group_id' => 1 ); $customer = $this->_objectManager->create('Magento\Customer\Model\Customer'); $customer->addData($data); $customer->setPasswordHash('...


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