Quick Fixes for Common Magento 2 Issues

Magento currently powers roughly 28% of websites across the internet, it is a very popular, SEO friendly, flexible and secure eCommerce platform. As resourceful as it can be, it is not perfect, however there are solutions to all of its issues that can be done without the help of a support team.
Let’s look at the most common challenges that store owners face and their quick fixes.

Site Performance and Speed

  • Enable Flat Catalog for categories and products

    To fasten the read speed of the database you should enable Flat Catalog. This will minify the number of database joins done when showing products and due to that the MySQL query complexity will be reduced.
    How to do it:
    Go to the backend -> Stores -> Configuration -> Catalog -> Catalog -> Store Front -> Use Flat Catalog Category and put “Yes” -> Save Config

  • Configure CDN (content delivery network)

    CDN is a geographically distributed group of servers which work together to provide fast delivery of internet content and it allows a fast transfer of assets needed for loading content, such as HTML pages, javascript files, stylesheets, images and videos.
    Amongst the benefits of using CDN we can mention the improvement of the website load times and security, the reduction of bandwidth costs and the increase in content availability.
    How to do it:
    ⦁ Stores -> General -> Configuration -> Web -> Base URLs
    ⦁ For Static View Files field, enter the URL of the location on the CDN where static view files are stored
    ⦁ For User Media Files field, enter the URL of the JavaScript files on the CDN
    ⦁ Open Base URLs (Secure) tab below.
    ⦁ Repeat the previous step here.
    ⦁ Save Config.

  • Merge CSS and JS Files

    Huge CSS and JS files make your frontend look fancy, but can drop your website loading speed. Here’s how you can improve the speed of the pages.

    How to do it:

    Stores -> Configuration -> Advanced -> Developer -> JavaScript/CSS Settings -> Merge JavaScript/CSS Files -> Yes -> Minify JavaScript/CSS Files -> Yes -> Save Config

  • Image optimization

    Image optimization can definitely make a difference in your site speed. In order to make sure you don’t unnecessarily overload the website, make sure you are uploading compressed image files, preferably jpeg formats for product images. Using png photos for the layout is recommended and svg format for your logo.

  • Caching

    Magento’s cache management system is an easy way to improve the performance of your site.
    How to do it:
    Go to System -> Cache Management -> Select the page you want -> Select Enable Option -> Click Submit Cache Page -> Save Config

    Magento 2 module Page Cache Warmer can automatically visits pages without cache and warms cache for these pages.

Payment Gateway Issues

PayPal

Proceeding to checkout, payment not being process or transaction being refunded. Does this sound familiar to you when it comes to common PayPal payments issues? This is how you can check if your gateway works:
⦁ Check your credentials, keys and license.
⦁ Make sure you applied the same functionalities to both Magento and PayPal.
⦁ Make sure your settings are configured the correct way in the admin panel.
Authorize.net is a built-in payment method and it’s a popular choice for processing orders online through credit cards. Some of the most common issues are invalid details, orders not being pushed through, server error, unable to refund an order and so on. Check the following before you address the issue to your support team:
⦁ Check your configuration (API transactional key, login ID).
⦁ Make sure “test mode” is not enabled.
⦁ Check for incorrect URLs in the settings tab (gateway URL, transaction details URL, API reference URL).
⦁ Check the Magento debug.log for other errors.

Search Function

The search function in Magento is not one of their strong features, however installing a module can help you improve this functionality. You can check out the demo extensions provided by Amasty, Mirasvit, Mageplaza or MageDelight, install it on your website and improve your users’ search experience.

CMS Issues

Magento’s CMS section allows easy editing to current pages or adding new ones from the back-end. The CSM editor has custom layouts for various pages which use defined values for that page, stored in the database. You can create static blocks on your page, style them according to your design, add customer contact form and widgets to it.
While the process of editing CMS pages is rather easy, there are common issues and errors that come up, such as pages not found, different display than the desired one, missing editor, missing images etc.
A popular solution to all of these is installing extensions such as Advanced Content Manager, which is customizable and easy to use.

Importing Products

Importing products through a CSV file (comma separated values) is a widely used method to import products, orders and customer data straight into the admin panel. It saves a lot of time if you want to switch from manually adding products in the catalog.
As easy as this process can be, people still run into issues every now and then. Here is a list of the most common import issues when dealing with CSV files:

Incorrect file formatting

This issue is likely to happen if you created the CSV file in Excel, which tends to generate an incorrect table structure after the import. One way to solve this is to download the CSV file directly from Magento and work in that template directly. The template should contain all the proper mappings, and you can get a better understanding of how the system uses the data from the file.
Special characters can cause errors too, so the best way to avoid this is to use UTF-8 formatting and place the special characters between quotation marks.

Issues with short descriptions

Try using a limited amount of characters when adding short descriptions to your file. If the text is too long it will automatically be cut off during the import. The recommended length of the short description is 255 characters.

Importing and exporting incorrect paths

Many users have reported issues regarding the import/export paths being blocked, which is stopping the data flow. The good news is that these permissions can be changed using solutions like the File Manager in cPanel or through FTP programs such as FileZilla.

Issues with image locations and importing thumbnails

CSV files allow you to import product images, but it’s not uncommon for errors to happen. Images are not saved if the path to the website folder is not accurately set.
Make sure the path to the correct folder is clear in order to avoid any errors and import issues. Importing thumbnails can also be problematic when dealing with CSV and Excel conversions. If the CSV is not importing thumbnail images correctly, try uploading them manually.
Magento issues are pretty common and with each release, they seem to find a way to solve them, however new ones appear and the cycle goes on. If solving problems on your own is giving you headaches, reach out to your development support team.