Categories
Magento 2

Magento 2 adding breadcrumb via layout XML or Controller

How we can add breadcrumb in page layout or controller? In this post I have added two different example how to added custom breadcrumb via XML or PHP Controller.

Added breadcrumb by layout XML file:

Add new Block on body tag like referenceBlock name=”breadcrumbs”

Added breadcrumb by PHP Controller:

Open your page controller and find public function execute() method and add $breadcrumbs->addCrumb what you want.

After added any one method for breadcrumbs just run following command via cli and check breadcrumbs is working fine.

Thank you for carefully read my article If you have any query please Leave your query on following comment section or contact with us. Please SHARE this post.

Categories
Magento 2

Magento 2 admin error: Product does not exists

After migrating Magento to version I am facing below issues while navigating to Product page.

Error: Class Magento\Catalog\Model\Product\Attribute\Backend\LayoutUpdate does not exist

Also I am going to editing product in admin panel getting the below error

Error: Product does not exists

Product does not exists

In Magento 2 some version Magento created the LayoutUpdate file with the attributes custom_layout_update_file, When we revert back version, the attribute calling the file and cause the issue.

Solution:

Go to your Database and search in table eav_attribute table like below sql. If you will find two records and just remove them.

Find or Select query:

Delete query:

After delete two records from database run following command via cli

If you have redis, you will need to flush the cache from it.

redis-cli flushdb – Delete all the keys of the currently selected DB.
redis-cli flushall – Delete all the keys of all the existing databases, not just the currently selected one.

Thank you for carefully read my article If you have any query please Leave your query on following comment section or contact with us. Please SHARE this post.

Categories
Magento 2

Getting exception: Missing required argument $options, when edit customer details from magento 2 admin.

Getting exception missing required argument $options, when edit customer details from magento 2 admin.

Exception:

Solution:

Open vendor\magento\module-eav\Model\Entity\Attribute\Source\Config.php file form Magento 2 project and update __construct method in very beginning of file.

To

Thank you for carefully read my article If you have any query please Leave your query on following comment section or contact with us. Please SHARE this post.