Monthly Archives: February 2020
Social media is a powerful platform that generates tons of information throughout the world every day. That is why such networks as Facebook and Twitter are commonly used for marketing purposes by a lot of stores. It allows them to attract more attention to their content and correspondingly drive more traffic to their websites with the help of Open Graph tags.
However, sometimes it happens that Facebook OG tags aren't working as they are supposed to. Instead of a great featured image and newly written title and description, you see the outdated information or don't see anything at all.
If you're wondering what could possibly cause Facebook to pull out the wrong OG data instead of the up-to-date one the answer is pretty simple. Facebook Open Graph Cache.
So, in order to make sure Facebook shows the proper Open Graph Information you just need to clear the Facebook cache.
Follow these steps to clear Facebook Open Graph Cache:
1. Navigate to the Facebook Sharing Debugger, paste
Hello there Magento fans!
Are you eager to learn about some news and updates we've have prepared for you this month?
Today (Feb 12, 2020) we have been notified about a potential security issue in our Magento 2 Login as Customer Extension thanks to Daniel Sloof's tweet.
Reviewing the code and communicating with Derrick Heesbeen, Lewis Voncken from experius.nl there was found the security issue.
Note that, no confirmed attacks related to this issue have occurred to date, however, malicious actors potentially were able to login to a customer account in a tiny timeframe after the admin user pressed the "Login As a Customer" button in the admin panel and before admin user was redirected to the storefront and actually logged in.
Timing is really important to reproduce this issue. The security issue may occur on all Login as Customer versions until v2.2.3 during just a few seconds after the pressing of the "Login As a Customer" button.
We encourage everyone who uses Login As Customer extension v2.0.0 - v2.2.2 to update the extension at least to v2.2.3 or apply this quick
If you decided to remove Magento 2 Translation Extension, please follow the steps below. You can contact our team for a free consultation in case you have any issues with Magefan's extension.
Remove Extension Files
1. If you can find the extension files in the folder
app/code/Magefan/Translation
app/code/Magefan/TranslationPlus
then remove this folder.
2. If the extension was installed via the composer and its files located in the folder
vendor/magefan/module-translation
then run composer CLI command to remove it
composer remove magefan/module-translation*
Once extension files have been removed, run these Magento CLI commands:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these zero downtime deployment commands for Magento 2.
Remove Extension Data (optional)
Attention! This will clean all translation log and extension configurations.
1. Just in case please
If you need to update Magento 2 Translation Extension by Magefan, please follow the steps below.
Note: the updating instructions depend on the method the Translation extension was installed with.
Update using composer
If the translation module was installed via the composer (check if vendor/magefan/module-translation folder exists), then you need to run these simple CLI commands in Magento 2 directory:
composer remove magefan/module-NAME
composer require magefan/module-NAME ^x.x.x
# replace NAME with:
# translation - for translation extension
# translation-plus - for translation plus extension
# replace x.x.x with the version you want to use
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
If you want to upgrade to Plus, check this guide on how to upgrade Translation extension plan.
Update using archive and FTP
If the translation module was installed via FTP (check if app/code/Magefan/Translation folder exists), then
You can install Magento 2 Translation Extension by Magefan, using composer or archive installation methods.
Do you want us to install the Translation extension for you? Let our technical engineers do it – check out our installation service.
Installation via composer (recommended)
Please navigate to your Magefan Account > My Downloads > Install via Composer to get the composer installation instructions.
Installation using archive and FTP
- Download Translation Extension ZIP-Archive from magefan.com website (not GitHub or other sources).
- Extract files.
- Copy app folder from the archive to your Magento 2 folder.
- In a command line, using "cd", navigate to your Magento 2 root directory.
- Run CLI commands:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these zero downtime deployment commands for Magento 2.
There are different reasons you would want to remove the currency switcher dropdown from Magento 2 storefront.
For example, you may want to remove it because you use Magento 2 Automatic Currency Switcher and don't want to allow customers to manually change a currency.
In order to remove the currency switcher dropdown follow these steps:
1. Create a new file inside your storefront theme folder:
app/design/frontend/ThemeVendor/ThemeName/Magento_Theme/layout/default.xml
2. Add this code into it:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="currency" remove="true" />
<referenceBlock name="store.settings.currency" remove="true" />
</body>
</page>
In case you already have Magento_Theme/layout/default.xml file, then edit it and put this code before </body> closing tag:
<referenceBlock name="currency" remove="true" />
There are cases when you want to remove the language switcher dropdown from the storefront.
For example, you may want to remove it because you use Magento 2 Automatic Language Switcher and don't want to allow customers to manually change a store view.
It is an easy task to do. Please follow these simple steps:
1. Create a new file inside your storefront theme folder:
app/design/frontend/ThemeVendor/ThemeName/Magento_Theme/layout/default.xml
2. Add this code into it:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="store_language" remove="true" />
</body>
</page>
In case you already have Magento_Theme/layout/default.xml file, then edit it and put this code before </body> closing tag:
<referenceBlock name="store_language" remove="true" />
3. Flush Magento cache, run CLI command:
bin/magento c:f
That's all :-)
Image optimization is one of the crucial steps you need to take to speed up Magento 2. Switching to the new WebP format developed by Google is a great way to start. They are smaller in size and correspondingly take less time to load.
There are two ways how you can convert images to WebP in Magento. You either do it automatically with the
tool or convert them elsewhere and upload them directly to the admin panel.Thus, in this guide, you'll learn everything you need to know to convert images to WebP in Magento both ways.
Should we start?
How to Convert Images to WebP in Magento?
Note: the Magefan extension comes with pre-set options. So all you need to do to start the WebP generation is enable the extension. Change the options only if you need to.
To start, go to Stores > Configuration > Magefan Extensions > WebP Images.
Step 1: Fill out the basic settings
In the basic setting, you can specify the quality of the converted WebP images, image metadata and the generation
If you decided to remove Magento 2 WebP Images Extension, please follow the steps below. You can contact our team for a free consultation in case you have any issues with Magefan's extension.
Remove Extension Files
Removing files instruction depends on the way WebP Images extension has been installed in.
1. If you can find the extension files in the folder
app/code/Magefan/WebP
app/code/Magefan/WebPPlus
app/code/Magefan/WebPExtra
then remove this folder.
2. If the extension was installed via the composer and its files located in the folder
vendor/magefan/module-webp
then run composer CLI command to remove it
composer remove magefan/module-webp*
Once extension files have been removed, run these Magento CLI commands:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these zero downtime deployment commands for Magento 2.
Remove Extension Data (optional)
If you need to update Magento 2 WebP Images Extension by Magefan, please follow the steps below.
Note: the updating instructions depend on the method the WebP images extension was installed with.
Update using composer
If the WebP images module was installed via the composer (check if vendor/magefan/module-webp folder exists), then you need to run these simple CLI commands in Magento 2 directory:
composer remove magefan/module-NAME
composer require magefan/module-NAME ^x.x.x
# replace NAME with:
# webp - for Basic plan
# webp-plus - for Plus plan
# webp-extra - for Extra plan
# replace x.x.x with the version you want to use
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
If you want to upgrade to Plus or Extra, check this guide on how to upgrade WebP Images plan.
Update using archive and FTP
If the WebP images module was installed via FTP (check if app/code/Magefan/WebP folder exists), then follow these commands:
You can install Magento 2 WebP Images Extension by Magefan, using composer or archive installation methods.
Do you want us to install and configure the WebP Images extension for you? Let our technical engineers do it – check out our installation service.
Attention! if you install the extension on Magento 2.4.0 there is a known issue in Magento 2.4.0 core "Error: main.CRITICAL: Error: Undefined class constant 'XML_PATH_HEADER_TRANSLATE_TITLE'. So before installing the extension please apply this change to your Magento instance. Note that this fix is already present in Magento 2.4.1.
Installation via composer (recommended)
Please navigate to your Magefan Account > My Downloads > Install via Composer to get the composer installation instructions.