Monthly Archives: April 2020

  1. Magefan News and Updates - April 2020

    Hello there, Magento fans!

    We sincerely hope you're safe, healthy, and ready to learn about some news and updates we've have prepared for you in April.

    Read more »
  2. schema deprecated - Error Fix Solution

    Recently we got an " schema deprecated and not supported by Google anymore. Please migrate to using types." error validating one of our website pages. The same error we got in Google Search Console. schema is deprecated and not supported by Google anymore. Please migrate to using types

    This " schema deprecated" error is related to the breadcrumbs structure data. We used "" schema for the structured data, but Google supports it no longer. 

    You may also receive this error starting from April 6, 2020, in case you haven't converted your structured data scheme from to

    Before we get to the point of how to

    Read more »
  3. How to display CMS Blocks on Magento 2 Pages via Widgets?

    Magento 2 CMS blocks are a great way to show different information to your customers. CMS blocks not only make your Magento 2 website more engaging but help you drive customers' attention to certain products, offers, or services. Static blocks are those pieces of content you can display practically on every page of your Magento 2 store.

    You can show CMS block on category page to notify your customers about the top products, add a static block to the CMS page or even another CMS block to diversify their content. 

    In case you don't want to spend too much time going through the CMS block configurations you can call the CMS block in PHTML file or using the layout XML file.

    However, in this article, you will learn about the most common way to insert CMS block in CMS page which is adding it with the help of a widget. So, once you create the CMS block you're good to go.

    Read more »
  4. How to call CMS block in Magento 2 using Layout XML?

    Magento 2 CMS blocks are managed directly from Magento admin using widgets / WYSWYG editor widgets and displayed on any page of your Magento 2 store. Except for displaying CMS block on CMS Page or CMS Block, showing it on category page there is an option to call CMS block programmatically using XML file.

    Use this code in order to add the CMS block using Magento 2 layout XML:

    <referenceContainer name="content">
      <block class="Magento\Cms\Block\Block" name="unick_block_name">
          <argument name="block_id" xsi:type="string">my_cmsblock_identifier</argument>

    Read more »
  5. How to display CMS block on Magento 2 Category Page?

    Displaying CMS blocks on Magento 2 category page allows you to inform your customers about some special offers and new category products. There are plenty of other reasons to add CMS block to the catalog category page in Magento 2. And many of you know them already. So, let's not stop here and start learning how to display CMS block on Magento 2 category page.

    Take the following steps to add CMS block to Magento 2 category page:

    1. Go to Catalog > Categories and choose the Category you want to display the CMS block on.

    Magento 2 Category

    2. In the Content section Add the CMS block you want to add.

    Read more »
  6. How to Call CMS block in Magento 2 PHTML file?

    There are cases when you need to display Magento 2 CMS block inside a PHTML template file. To programmatically call the CMS block in .phtml template file please use this code:

        echo $this->getLayout()
            ->setBlockId('my_cmsblock_identifier') //replace my_cmsblock_identifier with real CMS bock identifier

    Note that your CMS block should exist and be enabled. If the CMS block is disabled or does not exist, this code will not display any content.

    The use of createBlock method is a fast but not ideal way in terms of best practices.

    So what you can do is add CMS block into your block using layout, use this code in a proper layout XML handle file and don't forget to flush Magento cache once the layout is changed: 

    Read more »
  7. How to Insert Magento 2 CMS Block into WYSIWYG Editor?

    In case you've already created the Magento 2 CMS block, you might be interested in where you can display it. Magento allows you to display CMS block on the category page, call the CMS block using layout XML or in PHTML file.

    However, what we're going to show you in this article is how to display the CMS block on Magento 2 CMS page or CMS block with the help of WYSIWYG editor. You can use this guide for WYSIWYG on other admin pages as well.

    For this tutorial, we've decided to include CMS block into CMS page as an example. So take the next steps or watch the video down below.

    Follow these steps to display the CMS block in content using WYSIWYG editor:

    1. Navigate to Content > Pages, choose the CMS page you want to display the CMS block on and in the Action section choose Edit.

    Magento 2 CMS Pages

    2. Unfold the Content section and press the Widget button to insert the widget.

    Read more »
  8. Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages - Magento 2 Fixes

    If you use Magento 2 and get an error like this:

    Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
    error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading in vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Post.php on line 72

    <pre>#1 file_get_contents() called at [vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Post.php:72]
    #2 ReCaptcha\RequestMethod\Post->submit() called at [vendor/google/recaptcha/src/ReCaptcha/ReCaptcha.php:156]
    #3 ReCaptcha\ReCaptcha->verify() called at [app/code/MSP/ReCaptcha/Model/Validate.php:79]
    #4 MSP\ReCaptcha\Model\Validate->validate() called at [app/code/MSP/ReCaptcha/Observer/ReCaptchaObserver.php:93]
    #5 MSP\ReCaptcha\Observer\ReCaptchaObserver->execute() called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:72]
    #6 Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod() called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:60]

    when trying to login to the admin panel, reset customer password, create a new customer account, etc., you can make a quick fix. To do this please follow the steps below:

    Read more »