Monthly Archives: May 2018

  1. Fix: Element 'block', attribute 'class' is not accepted by the pattern

    If you use Magefan Blog Extension on Magento 2.2.x or greater and receive the error message:

    1 exception(s):
    Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value '\Magento\Framework\View\Element\Text\ListText' is not accepted by the pattern '[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*'.
    Line: 982
    
    Element 'block', attribute 'class': '\Magento\Framework\View\Element\Text\ListText' is not a valid value of the atomic type 'blockClassType'.
    Line: 982
    
    
    Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value '\Magento\Framework\View\Element\Text\ListText' is not accepted by the pattern '[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*'.
    Line: 982
    
    Element 'block', attribute 'class': '\Magento\Framework\View\Element\Text\ListText' is not a valid value of the atomic type 'blockClassType'.
    Line: 982
    

    First please make sure that you have updated the blog extension to the newest version.

    Read more »
  2. Add Custom Field To Magento 2 Blog Post

    If you need to extend Magento 2 Blog Module by Magefan and add a new custom text field to Blog Post edit page in Magento 2 Admin panel (Content  > Blog > Posts) you must to create a simple custom Magento 2 Extension.

    You can download a sample extension from our GitHub page or you can create it manually using the steps below:

    1. Create composer.json file

    app/code/Magefan/BlogCustomField/composer.json
    {
    "name": "magefan/module-blog-custom-field",
    "description": "Implements Blog functionality on Magento 2 store",
    "require": {
    "magefan/module-blog" : ">=2.8.0"
    },
    "type": "magento2-module",
    "version": "2.0.0",
    "license": [
    "OSL-3.0",
    "AFL-3.0"
    ],
    "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
    "Magefan\\BlogCustomField\\": ""
    }
    }
    }

     

    Read more »
  3. Magefan Magento 2 Blog Comments Missing

    If you use a third-party theme for your Magento 2 store and have enabled "Use Magefan Blog Comments" as a blog comment option and flushed the Magento cache

    Magneto 2 Blog Comments

    but you still cannot see the comments on the blog post page on the storefront, please compare layout file blog_post_view.xml in your theme folder

    Read more »
  4. No such entity - Fix for Magento 2

    If you receive the error message "No such entity.", "No such entity with" or "No such entity with customerId" in Magento 2, the issue usually occurred when you try to load not existing object via Magento 2 Repository Class.

    To debug this issue, please open the file

    vendor/magento/framework/Exception/NoSuchEntityException.php

    Read more »
  5. Display Tag Count In The Magento 2 Blog Tag Cloud Sidebar

    If you need to display tag count in the Magento 2 Blog tag cloud sidebar, you need to extend the tags sidebar template.

    To do this:

    1. Copy the template file from the Blog extension folder

    view/frontend/templates/sidebar/tag_claud.phtml

    to your theme folder

    app/design/frontend/ThemeVendor/themename/Magefan_Blog/templates/sidebar/tag_claud.phtml

    Read more »