Monthly Archives: February 2018

  1. Magento 2.2.x layout pattern issue

    If you use Magento 2.2.x and get the error like:

    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: 1187
    Element 'block', attribute 'class': '\Magento\Framework\View\Element\Text\ListText' is not a valid value of the atomic type 'blockClassType'.
    Line: 1187

    Please find in all *.xml layout files string

    class="\

    and replace it with

    class="

    (Remove slash from the beginning of the class attribute value)

    Read more »
  2. How to update Magento 2 Extension?

    Keeping your online store secure and with fewer bugs is one of the top priorities of each merchant. That's why you want to keep Magento and Magento 2 Extensions up-to-date.

    Updating the extension is not a hard task but it can be challenging if you perform it for the first time. If you are not a technical person, we always recommend using a professional upgrading service.

    If you wish to update Magento 2 extension by yourself please follow the steps below:

    (In the guide, we update module Company_ModuleName).

    1. Create a backup of your Magento 2 files and database.

    2. Define using which method the extension has been originally installed with to define the file structure of the module.

    If the extension files are located in the folder vendor/company/module-name, then the extension was installed using the Composer and you need to use the Composer for the upgrade.

    If you can find extension files in the folder app/code/Company/ModuleName, then the extension was installed manually using e.g. FTP/SFTP and you need to use FTP/SFTP to upgrade it.

    Read more »
  3. Magento 2 Observer and Event

    Imagine you are cooking pasta and sit down to play some game. You listen with one ear to see if the "dish" does not boil away. In this case, you are an observer. When the pasta starts to boil away — the event "pasta_began_to_boil_away" is triggered, which causes you (the observer) to rush to the kitchen (perform an action, an algorithm).

    In Magento 2, as in real life, there are observers and events that are implemented on the basis of the "Publish-subscribe pattern". We have already described  plugins in Magento 2, which allows you to extend and change the functionality of the store. Let's see how you can do this with the help of events and observers in Magento 2.

    Events 

    Events are triggered by Magento 2 modules when an action has occurred or has to occur. Magento has many native events and also allows you to call your own event.

    Use the dispatch method of the \Magento\Framework\Event\ Manager class to call an event.

    Read more »
  4. Magento Security Scan Tool

    Great News! Magento has introduced a new feature -  Security Scan. This tool allows you to monitor your site(s) for known security risks from patches updates to malware and unauthorized access. Security tool is FREE for merchants and developers. 

    Security Scan is available for Magento 2 stores as well as for Magento 1. We have already setup it for Magefan.com and recommend you do the same.

    Magento Security Scan Tool

     

     

    Please watch the videos below to learn how to setup Security Scan for your store.

    Read more »
  5. EM Themes Blog for Magento 2 / EM Blog

    If you use (or have used) EM Blog & News extension on your Magento 1 store, and now you're migrating to Magento 2, you can have a problem because EM Theme does not provide Blog extension for M2.

    Fortunately, you can use Magento 2 Blog extension by Magefan, what has a lot of features and it's free. Our team can help you to migrate all blog data such as posts, categories, tags, comments, images to your new store on Magento 2.

     

    Request a Quote Today

    Read more »
  6. Magento2 Ultimo Theme Blog Link in Menu

    If you have already installed Magento 2 Blog Module v2.6.2 (or later) you can easily add a blog link to the Menu on your Ultimo theme.

    Blog Link in Ultimo Theme

     

     

     

     

    Read more »
  7. Overriding and Extending JS files in Magento 2

    You often need to change the JavaScript code logic located in the .js file. The easiest way is to override the js file is by using a theme. You can learn how to override view files in the article about Overriding Magento 2 Storeftont Files. This is a quick but not an elegant way.

    To change one or more js-file methods, use the mixins available in RequireJS.

    To extend this file:

    app/code/VendorName/ModuleName/view/%area%/web/js/folder1/folder2/somefile.js

    Read more »
  8. bash: bin/magento: Permission denied

    Usually, you get the error bash permission denied when running some script/file that does not have execute permissions. All you need to do is to change file permissions and add executive one.

    To fix the bash permission denied error follow these steps:

    1. Open terminal (shell)

    2. Navigate to the folder with the script

    3. Run the CLI command to change file permission settings:

    chmod +x path_to_file/file_name

    For example, if you run a Magento 2 CLI command:

    bin/magento ...

    and get the error:

    bash: bin/magento: Permission denied

    You need to add an execute (x) permission to the bin/magento file.

    Read more »
^Top
Chat