34

Just run the below command in magento root directory, it will show that log file location. grep -r "Report ID: webapi-5c644d10f0e26" var/ Note: Change the above report id as per your error report - e.g) Report ID: webapi-xxxxxxxxxxx Up to my mind it is in exception.log file and find the line with the content webapi-5c644d10f0e26 for the detailed ...


14

We can use the below command to make sure the particular module has any circular dependency. php bin/magento info:dependencies:show-modules-circular Above command generate one CSV file in magento-root-folder/modules-circular-dependencies.csv, please analyze this and make a decision. Also, while disabling extension use the below command, it will throw an ...


14

I have just make Link and redirect it product detail page. Please check my answer and change as per your need. Create a actionsColumn in ui component xml like below : <actionsColumn name="product_id" class="<<vendor>>\<<modulename>>\Ui\Component\Listing\Columns\ProductActions"> <argument name="data" xsi:type="...


12

Update Things to check: Ensure that store views are not configured as any defaults. Website Scope Store Scope - AKA: Store Group Ensure that config.php is not using the store view https://devdocs.magento.com/guides/v2.2/config-guide/config/config-php.html https://devdocs.magento.com/guides/v2.2/config-guide/config/config-files.html Ensure that the ...


11

You need to use the factory method when FPC is enabled. By Factory Method : /** * @var \Magento\Customer\Model\Session */ protected $_customerSessionFactory; public function __construct( .... \Magento\Customer\Model\SessionFactory $customerSessionFactory .... ) { .... $this->_customerSessionFactory = $customerSessionFactory; ......


9

Pagefactory is used to initialize the layout. Its working in magento2 same like as in magento1 was doing with below code $this->_view->loadLayout(); $this->_view->renderLayout();


7

After some goggling and with the help of some core modules I came up with following solution : /** * @var \Magento\Sales\Api\OrderRepositoryInterface */ protected $orderRepository; /** * @var \Magento\Catalog\Api\ProductRepositoryInterface */ protected $productRepository; /** * @var \Magento\Quote\Api\Data\CartItemInterfaceFactory */ protected $...


7

You can create your column as index key for better performance and speedy retrieval of data from a table. An index is a performance optimization feature that enables data to be accessed faster compare to other nonindex columns. An index is used to more quickly find rows in the table based on the values which are part of the index and they don’t define the ...


6

Add this code on your form code where you want to add innerlisting <insertListing> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="autoRender" xsi:type="boolean">true</item> <item name="ns" xsi:type="string">Name_of_listing_file&...


6

First you have to do this changes at your theme level. Goto app/design/frontend/{ThemeVendorname}/{ThemeName}/Magento_Catalog/templates/product/ And open list.phtml and delete the code: <form data-role="tocart-form" data-product-sku="<?= $block->escapeHtml($_product->getSku()) ?>" action="<?= /* @NoEscape */ $postParams['action'] ?>" ...


6

Try via plugin method: CompanyName/ModuleName/etc/adminhtml/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab\Front"> <plugin ...


6

i solve my marge issue as First Way: For CSS you need to do something similar to manually enable it. The following has worked for me: php bin/magento config:set dev/css/merge_css_files 1 php bin/magento config:set dev/css/minify_files 1 php bin/magento config:set dev/js/merge_files 1 php bin/magento config:set dev/js/minify_files 1 Another Way: ...


6

Sometimes, while running our data migration it seems that the tables eav_form_element and customer_form_attribute lost some information during the migration. The quick fix was to add in the missing postcode and phone number fields into the appropriate tables. INSERT INTO `customer_form_attribute` (`form_code`, `attribute_id`) VALUES ('...


6

@CJNotts This error occurs when once integer is stored for State/Province field, it can not be changed to alphanumeric . Please go through this https://github.com/magento/magento2/issues/14052 . You can fix this by making changes to the core file Path magento_rootdirectory/vendor/magento/module-customer/Model/Address/AbstractAddress.php line 650 ...


6

Check the grunt versions into package.json this solves the issue "devDependencies": { "glob": "~7.1.1", "grunt": "^1.0.2", "grunt-autoprefixer": "~3.0.4", "grunt-banner": "~0.6.0", "grunt-continue": "~0.1.0", "grunt-contrib-clean": "~1.0.0", "grunt-contrib-connect": "~1.0.2", "grunt-contrib-cssmin": "~2.0.0", "grunt-...


6

Just to consolidate all this information: 1: Create (or use) a custom module under app/code/YourModule - eg app/code/YourModule/Sales 2: Add a <preference \> entry to app/code/YourModule/Sales/etc/di.xml - eg: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...


6

You can use update parent::_construct(); $this->buttonList->update('save', 'onclick', 'setLocation(\'' . $this->getUrl('*/*/<youraction>') . '\')');


6

You can give a try to below code: 1). Using Object Manager $ObjectManager= \Magento\Framework\App\ObjectManager::getInstance(); $context = $ObjectManager->get('Magento\Framework\App\Http\Context'); $isLoggedIn = $context->getValue(\Magento\Customer\Model\Context::CONTEXT_AUTH); return $isLoggedIn; 2). DI way /** * @var \Magento\Customer\Model\...


5

Reference : Click here => Follow the step to create video : Create a controller Test.php file on this below path : CompanyName\ModuleName\Controller\Index <?php namespace CompanyName\ModuleName\Controller\Index; use Magento\Framework\App\Action\Action; class Test extends Action { protected $videoGalleryProcessor; protected $_product; ...


5

I think you can fetch all product data using following code. Just put this code in your php file example.php. Hope it works. <?php use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $params = $_SERVER; $bootstrap = Bootstrap::create(BP, $params); $obj = $bootstrap->getObjectManager(); $state = $obj->get('Magento\...


5

magento provide facility to add product attribute directly in grid without any customization. Please check carefully the selected checkbox are all table columns while unchecked are product attributes. You can add any product or customer attribute in that section by below back-end configuration. navigate to Stores and click on Product from Attributes ...


5

Minifying and merging js and css can improve load times and general performance of your store, so it should be enabled in production mode, but if you have to do any kind of development then you should not enable it. In production mode the developer tab in admin store configuration in removed so you have to manually enter values in db to enable and disable ...


5

Change typr, <preference for="Magento\Catalog\Model\Product\Attribute\Backend\Price" typr="Pawan\Catalog\Model\Rewrite\Product\Attribute\Backend\Price" /> to type: <preference for="Magento\Catalog\Model\Product\Attribute\Backend\Price" type="Pawan\Catalog\Model\Rewrite\Product\Attribute\Backend\Price" />


5

I have faced same type of error few days ago. You can fix it by following ways.. chmod 777 -R var/ generated/(root access if don't have root access try with sudo) NP: *****you need to give permission every time when you use below cmd.***** php bin/magento cache:flush So, you need to give proper permission of your application . you can follow below links....


5

Create a file named 2columns-left.xml in your theme under below path: app/design/frontend/Vendor/theme/Magento_Theme/page_layout/2columns-left.xml and use the below content for 2columns-left.xml: <?xml version="1.0"?> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/...


5

Using "Magento\Framework\App\RouterList" we use the di.xml file in our module. app/code/Vendor/Module/etc/di.xml <type name="Magento\Framework\App\RouterList"> <arguments> <argument name="routerList" xsi:type="array"> <item name="customrouter" xsi:type="array"> <item name="class" ...


5

There is nothing wrong with your page cache, actually it's a feature of Magento2 that whenever a product/category/cms is saved, then it invalidate particular cache tag then it will regenerate cache on page visit. Each entity (Product/Category/CMS) has it's own cache tag, from which you can access that cache directly through tag, and you can also delete that ...


5

It is a default feature in Magento for managing public and private content, it automatically checks the state when any POST request is made and sends proper data after it validates all the cache to the respective hash in X-Magento-Vary cookie or using the customer sections. You can read up on these concepts on devdocs here - https://devdocs.magento.com/...


5

You can set true and false by param value using this below way : $id = $this->getRequest()->getParam('id', false); $fieldset->addField( 'giftcard_comment', 'textarea', [ 'label' => __('Comment'), 'title' => __('Comment'), 'name' => 'giftcard_comment', 'required' => false, 'readonly' =&...


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