Breadcrumbs not displaying in frontend and admin in Magento 2.2.4?How to turn on Template Path Hints in Magento2 Through Code editContact us form not display in Block list of Magento 2Template Path Hints not showing on front-end in magento2How to display category and price filter on layered navigation in Magento 2?How to adding sender's name to order comments in Magento2 admin?Path hints not displaying in frontend and admin in Magento 2.2.4?Where to add google analytics script code in magento2 file path?Shipping Cost and Tax not working after installing amazon payments extension in magento2.2.4?ccavenue is not showing in magento 2.2 frontendOrder emails and newsletter subscription emails are not sending in magento2.2.7?

Should I leave building the database for the end?

Did DOS zero out the BSS area when it loaded a program?

Dogfights in outer space

Why did IBM make the PC BIOS source code public?

In which case does the Security misconfiguration vulnerability apply to?

Is this n-speak?

What is the most difficult concept to grasp in Calculus 1?

Are employers legally allowed to pay employees in goods and services equal to or greater than the minimum wage?

"Mouth-breathing" as slang for stupidity

Locked Room Murder!! How and who?

Creating some gif with tikz: Any idea to get better result?

Why not demand President's/candidate's financial records instead of tax returns?

Why aren't rainbows blurred-out into nothing after they are produced?

What should we do with manuals from the 80s?

Would the USA be eligible to join the European Union?

How much can I judge a company based on a phone screening?

How was the murder committed?

Why does Japan use the same type of AC power outlet as the US?

Is there a way to proportionalize fixed costs in a MILP?

Finding the shaded region

Does fossil fuels use since 1990 account for half of all the fossil fuels used in history?

How do I ask for 2-3 days per week remote work in a job interview?

How far did Gandalf and the Balrog drop from the bridge in Moria?

Word for an event that will likely never happen again



Breadcrumbs not displaying in frontend and admin in Magento 2.2.4?


How to turn on Template Path Hints in Magento2 Through Code editContact us form not display in Block list of Magento 2Template Path Hints not showing on front-end in magento2How to display category and price filter on layered navigation in Magento 2?How to adding sender's name to order comments in Magento2 admin?Path hints not displaying in frontend and admin in Magento 2.2.4?Where to add google analytics script code in magento2 file path?Shipping Cost and Tax not working after installing amazon payments extension in magento2.2.4?ccavenue is not showing in magento 2.2 frontendOrder emails and newsletter subscription emails are not sending in magento2.2.7?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I don't know how to implement this task. In admin page, I have stores->Configuration->Advanced->developer



I have to choose to enable path hints in front page "yes".



But in Front-end not display breadcrumbs.



Can you please help me?










share|improve this question


























  • breadcrumbs is not visible only in product page or all page ?

    – Emipro Technologies Pvt. Ltd.
    Jun 27 '18 at 11:38











  • Hi, breadcrumbs are not visible on all pages.

    – Dileep Kumar
    Jun 27 '18 at 11:47











  • Are you using custom theme ?

    – Emipro Technologies Pvt. Ltd.
    Jun 27 '18 at 11:48











  • yes. Smartwave Porto theme I am using.

    – Dileep Kumar
    Jun 27 '18 at 11:49











  • Hi, Can you please help me?

    – Dileep Kumar
    Jun 27 '18 at 11:59

















0















I don't know how to implement this task. In admin page, I have stores->Configuration->Advanced->developer



I have to choose to enable path hints in front page "yes".



But in Front-end not display breadcrumbs.



Can you please help me?










share|improve this question


























  • breadcrumbs is not visible only in product page or all page ?

    – Emipro Technologies Pvt. Ltd.
    Jun 27 '18 at 11:38











  • Hi, breadcrumbs are not visible on all pages.

    – Dileep Kumar
    Jun 27 '18 at 11:47











  • Are you using custom theme ?

    – Emipro Technologies Pvt. Ltd.
    Jun 27 '18 at 11:48











  • yes. Smartwave Porto theme I am using.

    – Dileep Kumar
    Jun 27 '18 at 11:49











  • Hi, Can you please help me?

    – Dileep Kumar
    Jun 27 '18 at 11:59













0












0








0








I don't know how to implement this task. In admin page, I have stores->Configuration->Advanced->developer



I have to choose to enable path hints in front page "yes".



But in Front-end not display breadcrumbs.



Can you please help me?










share|improve this question
















I don't know how to implement this task. In admin page, I have stores->Configuration->Advanced->developer



I have to choose to enable path hints in front page "yes".



But in Front-end not display breadcrumbs.



Can you please help me?







admin magento2.2 template-hints






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 27 '18 at 12:24









Nikunj Vadariya

3,0431 gold badge9 silver badges25 bronze badges




3,0431 gold badge9 silver badges25 bronze badges










asked Jun 27 '18 at 11:36









Dileep KumarDileep Kumar

1239 bronze badges




1239 bronze badges















  • breadcrumbs is not visible only in product page or all page ?

    – Emipro Technologies Pvt. Ltd.
    Jun 27 '18 at 11:38











  • Hi, breadcrumbs are not visible on all pages.

    – Dileep Kumar
    Jun 27 '18 at 11:47











  • Are you using custom theme ?

    – Emipro Technologies Pvt. Ltd.
    Jun 27 '18 at 11:48











  • yes. Smartwave Porto theme I am using.

    – Dileep Kumar
    Jun 27 '18 at 11:49











  • Hi, Can you please help me?

    – Dileep Kumar
    Jun 27 '18 at 11:59

















  • breadcrumbs is not visible only in product page or all page ?

    – Emipro Technologies Pvt. Ltd.
    Jun 27 '18 at 11:38











  • Hi, breadcrumbs are not visible on all pages.

    – Dileep Kumar
    Jun 27 '18 at 11:47











  • Are you using custom theme ?

    – Emipro Technologies Pvt. Ltd.
    Jun 27 '18 at 11:48











  • yes. Smartwave Porto theme I am using.

    – Dileep Kumar
    Jun 27 '18 at 11:49











  • Hi, Can you please help me?

    – Dileep Kumar
    Jun 27 '18 at 11:59
















breadcrumbs is not visible only in product page or all page ?

– Emipro Technologies Pvt. Ltd.
Jun 27 '18 at 11:38





breadcrumbs is not visible only in product page or all page ?

– Emipro Technologies Pvt. Ltd.
Jun 27 '18 at 11:38













Hi, breadcrumbs are not visible on all pages.

– Dileep Kumar
Jun 27 '18 at 11:47





Hi, breadcrumbs are not visible on all pages.

– Dileep Kumar
Jun 27 '18 at 11:47













Are you using custom theme ?

– Emipro Technologies Pvt. Ltd.
Jun 27 '18 at 11:48





Are you using custom theme ?

– Emipro Technologies Pvt. Ltd.
Jun 27 '18 at 11:48













yes. Smartwave Porto theme I am using.

– Dileep Kumar
Jun 27 '18 at 11:49





yes. Smartwave Porto theme I am using.

– Dileep Kumar
Jun 27 '18 at 11:49













Hi, Can you please help me?

– Dileep Kumar
Jun 27 '18 at 11:59





Hi, Can you please help me?

– Dileep Kumar
Jun 27 '18 at 11:59










1 Answer
1






active

oldest

votes


















0














Porto has removed breadcrumb from home page that's why its not displayed in home page.



For product page , breadcrumb is not visible its because of magento bug 2.2.4. to solve this issue override breadcrumb.js file from your current theme.




app/design/frontend/Smartwave/Porto/Catalog/view/frontend/web/js/product/breadcrumbs.js




/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

define([
'jquery',
'Magento_Theme/js/model/breadcrumb-list'
], function ($, breadcrumbList)
'use strict';

return function (widget)

$.widget('mage.breadcrumbs', widget,
options:
categoryUrlSuffix: '',
useCategoryPathInUrl: false,
product: '',
categoryItemSelector: '.category-item',
menuContainer: '[data-action="navigation"] > ul'
,

/** @inheritdoc */
_render: function ()
this._appendCatalogCrumbs();
this._super();
,

/**
* Append category and product crumbs.
*
* @private
*/
_appendCatalogCrumbs: function ()
var categoryCrumbs = this._resolveCategoryCrumbs();

categoryCrumbs.forEach(function (crumbInfo)
breadcrumbList.push(crumbInfo);
);

if (this.options.product)
breadcrumbList.push(this._getProductCrumb());

,

/**
* Resolve categories crumbs.
*
* @return Array
* @private
*/
_resolveCategoryCrumbs: function ()
var menuItem = this._resolveCategoryMenuItem(),
categoryCrumbs = [];

if (menuItem !== null && menuItem.length)
categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));

while ((menuItem = this._getParentMenuItem(menuItem)) !== null)
categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));



return categoryCrumbs;
,

/**
* Returns crumb data.
*
* @param Object menuItem
* @return Object
* @private
*/
_getCategoryCrumb: function (menuItem)
return
'name': 'category',
'label': menuItem.text(),
'link': menuItem.attr('href'),
'title': ''
;
,

/**
* Returns product crumb.
*
* @return Object
* @private
*/
_getProductCrumb: function ()
return
'name': 'product',
'label': this.options.product,
'link': '',
'title': ''
;
,

/**
* Find parent menu item for current.
*
* @param Object menuItem
* @return null
* @private
*/
_getParentMenuItem: function (menuItem)
var classes,
classNav,
parentClass,
parentMenuItem = null;

if (!menuItem)
return null;


classes = menuItem.parent().attr('class');
classNav = classes.match(/(nav-)[0-9]+(-[0-9]+)+/gi);

if (classNav)
classNav = classNav[0];
parentClass = classNav.substr(0, classNav.lastIndexOf('-'));

if (parentClass.lastIndexOf('-') !== -1)
parentMenuItem = $(this.options.menuContainer).find('.' + parentClass + ' > a');
parentMenuItem = parentMenuItem.length ? parentMenuItem : null;



return parentMenuItem;
,

/**
* Returns category menu item.
*
* Tries to resolve category from url or from referrer as fallback and
* find menu item from navigation menu by category url.
*
* @return null
* @private
*/
_resolveCategoryMenuItem: function ()
var categoryUrl = this._resolveCategoryUrl(),
menu = $(this.options.menuContainer),
categoryMenuItem = null;

if (categoryUrl && menu.length)
categoryMenuItem = menu.find(
this.options.categoryItemSelector +
' > a[href="' + categoryUrl + '"]'
);


return categoryMenuItem;
,

/**
* Returns category url.
*
* @return String
* @private
*/
_resolveCategoryUrl: function ()
var categoryUrl;

if (this.options.useCategoryPathInUrl)
// In case category path is used in product url - resolve category url from current url.
categoryUrl = window.location.href.split('?')[0];
categoryUrl = categoryUrl.substring(0, categoryUrl.lastIndexOf('/')) +
this.options.categoryUrlSuffix;
else
// In other case - try to resolve it from referrer (without parameters).
categoryUrl = document.referrer;

if (categoryUrl.indexOf('?') > 0)
categoryUrl = categoryUrl.substr(0, categoryUrl.indexOf('?'));



return categoryUrl;

);

return $.mage.breadcrumbs;
;
);


after do setup upgrade and deploy. in product page breadcrumb is visible.






share|improve this answer



























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f231527%2fbreadcrumbs-not-displaying-in-frontend-and-admin-in-magento-2-2-4%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Porto has removed breadcrumb from home page that's why its not displayed in home page.



    For product page , breadcrumb is not visible its because of magento bug 2.2.4. to solve this issue override breadcrumb.js file from your current theme.




    app/design/frontend/Smartwave/Porto/Catalog/view/frontend/web/js/product/breadcrumbs.js




    /**
    * Copyright © Magento, Inc. All rights reserved.
    * See COPYING.txt for license details.
    */

    define([
    'jquery',
    'Magento_Theme/js/model/breadcrumb-list'
    ], function ($, breadcrumbList)
    'use strict';

    return function (widget)

    $.widget('mage.breadcrumbs', widget,
    options:
    categoryUrlSuffix: '',
    useCategoryPathInUrl: false,
    product: '',
    categoryItemSelector: '.category-item',
    menuContainer: '[data-action="navigation"] > ul'
    ,

    /** @inheritdoc */
    _render: function ()
    this._appendCatalogCrumbs();
    this._super();
    ,

    /**
    * Append category and product crumbs.
    *
    * @private
    */
    _appendCatalogCrumbs: function ()
    var categoryCrumbs = this._resolveCategoryCrumbs();

    categoryCrumbs.forEach(function (crumbInfo)
    breadcrumbList.push(crumbInfo);
    );

    if (this.options.product)
    breadcrumbList.push(this._getProductCrumb());

    ,

    /**
    * Resolve categories crumbs.
    *
    * @return Array
    * @private
    */
    _resolveCategoryCrumbs: function ()
    var menuItem = this._resolveCategoryMenuItem(),
    categoryCrumbs = [];

    if (menuItem !== null && menuItem.length)
    categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));

    while ((menuItem = this._getParentMenuItem(menuItem)) !== null)
    categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));



    return categoryCrumbs;
    ,

    /**
    * Returns crumb data.
    *
    * @param Object menuItem
    * @return Object
    * @private
    */
    _getCategoryCrumb: function (menuItem)
    return
    'name': 'category',
    'label': menuItem.text(),
    'link': menuItem.attr('href'),
    'title': ''
    ;
    ,

    /**
    * Returns product crumb.
    *
    * @return Object
    * @private
    */
    _getProductCrumb: function ()
    return
    'name': 'product',
    'label': this.options.product,
    'link': '',
    'title': ''
    ;
    ,

    /**
    * Find parent menu item for current.
    *
    * @param Object menuItem
    * @return null
    * @private
    */
    _getParentMenuItem: function (menuItem)
    var classes,
    classNav,
    parentClass,
    parentMenuItem = null;

    if (!menuItem)
    return null;


    classes = menuItem.parent().attr('class');
    classNav = classes.match(/(nav-)[0-9]+(-[0-9]+)+/gi);

    if (classNav)
    classNav = classNav[0];
    parentClass = classNav.substr(0, classNav.lastIndexOf('-'));

    if (parentClass.lastIndexOf('-') !== -1)
    parentMenuItem = $(this.options.menuContainer).find('.' + parentClass + ' > a');
    parentMenuItem = parentMenuItem.length ? parentMenuItem : null;



    return parentMenuItem;
    ,

    /**
    * Returns category menu item.
    *
    * Tries to resolve category from url or from referrer as fallback and
    * find menu item from navigation menu by category url.
    *
    * @return null
    * @private
    */
    _resolveCategoryMenuItem: function ()
    var categoryUrl = this._resolveCategoryUrl(),
    menu = $(this.options.menuContainer),
    categoryMenuItem = null;

    if (categoryUrl && menu.length)
    categoryMenuItem = menu.find(
    this.options.categoryItemSelector +
    ' > a[href="' + categoryUrl + '"]'
    );


    return categoryMenuItem;
    ,

    /**
    * Returns category url.
    *
    * @return String
    * @private
    */
    _resolveCategoryUrl: function ()
    var categoryUrl;

    if (this.options.useCategoryPathInUrl)
    // In case category path is used in product url - resolve category url from current url.
    categoryUrl = window.location.href.split('?')[0];
    categoryUrl = categoryUrl.substring(0, categoryUrl.lastIndexOf('/')) +
    this.options.categoryUrlSuffix;
    else
    // In other case - try to resolve it from referrer (without parameters).
    categoryUrl = document.referrer;

    if (categoryUrl.indexOf('?') > 0)
    categoryUrl = categoryUrl.substr(0, categoryUrl.indexOf('?'));



    return categoryUrl;

    );

    return $.mage.breadcrumbs;
    ;
    );


    after do setup upgrade and deploy. in product page breadcrumb is visible.






    share|improve this answer





























      0














      Porto has removed breadcrumb from home page that's why its not displayed in home page.



      For product page , breadcrumb is not visible its because of magento bug 2.2.4. to solve this issue override breadcrumb.js file from your current theme.




      app/design/frontend/Smartwave/Porto/Catalog/view/frontend/web/js/product/breadcrumbs.js




      /**
      * Copyright © Magento, Inc. All rights reserved.
      * See COPYING.txt for license details.
      */

      define([
      'jquery',
      'Magento_Theme/js/model/breadcrumb-list'
      ], function ($, breadcrumbList)
      'use strict';

      return function (widget)

      $.widget('mage.breadcrumbs', widget,
      options:
      categoryUrlSuffix: '',
      useCategoryPathInUrl: false,
      product: '',
      categoryItemSelector: '.category-item',
      menuContainer: '[data-action="navigation"] > ul'
      ,

      /** @inheritdoc */
      _render: function ()
      this._appendCatalogCrumbs();
      this._super();
      ,

      /**
      * Append category and product crumbs.
      *
      * @private
      */
      _appendCatalogCrumbs: function ()
      var categoryCrumbs = this._resolveCategoryCrumbs();

      categoryCrumbs.forEach(function (crumbInfo)
      breadcrumbList.push(crumbInfo);
      );

      if (this.options.product)
      breadcrumbList.push(this._getProductCrumb());

      ,

      /**
      * Resolve categories crumbs.
      *
      * @return Array
      * @private
      */
      _resolveCategoryCrumbs: function ()
      var menuItem = this._resolveCategoryMenuItem(),
      categoryCrumbs = [];

      if (menuItem !== null && menuItem.length)
      categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));

      while ((menuItem = this._getParentMenuItem(menuItem)) !== null)
      categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));



      return categoryCrumbs;
      ,

      /**
      * Returns crumb data.
      *
      * @param Object menuItem
      * @return Object
      * @private
      */
      _getCategoryCrumb: function (menuItem)
      return
      'name': 'category',
      'label': menuItem.text(),
      'link': menuItem.attr('href'),
      'title': ''
      ;
      ,

      /**
      * Returns product crumb.
      *
      * @return Object
      * @private
      */
      _getProductCrumb: function ()
      return
      'name': 'product',
      'label': this.options.product,
      'link': '',
      'title': ''
      ;
      ,

      /**
      * Find parent menu item for current.
      *
      * @param Object menuItem
      * @return null
      * @private
      */
      _getParentMenuItem: function (menuItem)
      var classes,
      classNav,
      parentClass,
      parentMenuItem = null;

      if (!menuItem)
      return null;


      classes = menuItem.parent().attr('class');
      classNav = classes.match(/(nav-)[0-9]+(-[0-9]+)+/gi);

      if (classNav)
      classNav = classNav[0];
      parentClass = classNav.substr(0, classNav.lastIndexOf('-'));

      if (parentClass.lastIndexOf('-') !== -1)
      parentMenuItem = $(this.options.menuContainer).find('.' + parentClass + ' > a');
      parentMenuItem = parentMenuItem.length ? parentMenuItem : null;



      return parentMenuItem;
      ,

      /**
      * Returns category menu item.
      *
      * Tries to resolve category from url or from referrer as fallback and
      * find menu item from navigation menu by category url.
      *
      * @return null
      * @private
      */
      _resolveCategoryMenuItem: function ()
      var categoryUrl = this._resolveCategoryUrl(),
      menu = $(this.options.menuContainer),
      categoryMenuItem = null;

      if (categoryUrl && menu.length)
      categoryMenuItem = menu.find(
      this.options.categoryItemSelector +
      ' > a[href="' + categoryUrl + '"]'
      );


      return categoryMenuItem;
      ,

      /**
      * Returns category url.
      *
      * @return String
      * @private
      */
      _resolveCategoryUrl: function ()
      var categoryUrl;

      if (this.options.useCategoryPathInUrl)
      // In case category path is used in product url - resolve category url from current url.
      categoryUrl = window.location.href.split('?')[0];
      categoryUrl = categoryUrl.substring(0, categoryUrl.lastIndexOf('/')) +
      this.options.categoryUrlSuffix;
      else
      // In other case - try to resolve it from referrer (without parameters).
      categoryUrl = document.referrer;

      if (categoryUrl.indexOf('?') > 0)
      categoryUrl = categoryUrl.substr(0, categoryUrl.indexOf('?'));



      return categoryUrl;

      );

      return $.mage.breadcrumbs;
      ;
      );


      after do setup upgrade and deploy. in product page breadcrumb is visible.






      share|improve this answer



























        0












        0








        0







        Porto has removed breadcrumb from home page that's why its not displayed in home page.



        For product page , breadcrumb is not visible its because of magento bug 2.2.4. to solve this issue override breadcrumb.js file from your current theme.




        app/design/frontend/Smartwave/Porto/Catalog/view/frontend/web/js/product/breadcrumbs.js




        /**
        * Copyright © Magento, Inc. All rights reserved.
        * See COPYING.txt for license details.
        */

        define([
        'jquery',
        'Magento_Theme/js/model/breadcrumb-list'
        ], function ($, breadcrumbList)
        'use strict';

        return function (widget)

        $.widget('mage.breadcrumbs', widget,
        options:
        categoryUrlSuffix: '',
        useCategoryPathInUrl: false,
        product: '',
        categoryItemSelector: '.category-item',
        menuContainer: '[data-action="navigation"] > ul'
        ,

        /** @inheritdoc */
        _render: function ()
        this._appendCatalogCrumbs();
        this._super();
        ,

        /**
        * Append category and product crumbs.
        *
        * @private
        */
        _appendCatalogCrumbs: function ()
        var categoryCrumbs = this._resolveCategoryCrumbs();

        categoryCrumbs.forEach(function (crumbInfo)
        breadcrumbList.push(crumbInfo);
        );

        if (this.options.product)
        breadcrumbList.push(this._getProductCrumb());

        ,

        /**
        * Resolve categories crumbs.
        *
        * @return Array
        * @private
        */
        _resolveCategoryCrumbs: function ()
        var menuItem = this._resolveCategoryMenuItem(),
        categoryCrumbs = [];

        if (menuItem !== null && menuItem.length)
        categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));

        while ((menuItem = this._getParentMenuItem(menuItem)) !== null)
        categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));



        return categoryCrumbs;
        ,

        /**
        * Returns crumb data.
        *
        * @param Object menuItem
        * @return Object
        * @private
        */
        _getCategoryCrumb: function (menuItem)
        return
        'name': 'category',
        'label': menuItem.text(),
        'link': menuItem.attr('href'),
        'title': ''
        ;
        ,

        /**
        * Returns product crumb.
        *
        * @return Object
        * @private
        */
        _getProductCrumb: function ()
        return
        'name': 'product',
        'label': this.options.product,
        'link': '',
        'title': ''
        ;
        ,

        /**
        * Find parent menu item for current.
        *
        * @param Object menuItem
        * @return null
        * @private
        */
        _getParentMenuItem: function (menuItem)
        var classes,
        classNav,
        parentClass,
        parentMenuItem = null;

        if (!menuItem)
        return null;


        classes = menuItem.parent().attr('class');
        classNav = classes.match(/(nav-)[0-9]+(-[0-9]+)+/gi);

        if (classNav)
        classNav = classNav[0];
        parentClass = classNav.substr(0, classNav.lastIndexOf('-'));

        if (parentClass.lastIndexOf('-') !== -1)
        parentMenuItem = $(this.options.menuContainer).find('.' + parentClass + ' > a');
        parentMenuItem = parentMenuItem.length ? parentMenuItem : null;



        return parentMenuItem;
        ,

        /**
        * Returns category menu item.
        *
        * Tries to resolve category from url or from referrer as fallback and
        * find menu item from navigation menu by category url.
        *
        * @return null
        * @private
        */
        _resolveCategoryMenuItem: function ()
        var categoryUrl = this._resolveCategoryUrl(),
        menu = $(this.options.menuContainer),
        categoryMenuItem = null;

        if (categoryUrl && menu.length)
        categoryMenuItem = menu.find(
        this.options.categoryItemSelector +
        ' > a[href="' + categoryUrl + '"]'
        );


        return categoryMenuItem;
        ,

        /**
        * Returns category url.
        *
        * @return String
        * @private
        */
        _resolveCategoryUrl: function ()
        var categoryUrl;

        if (this.options.useCategoryPathInUrl)
        // In case category path is used in product url - resolve category url from current url.
        categoryUrl = window.location.href.split('?')[0];
        categoryUrl = categoryUrl.substring(0, categoryUrl.lastIndexOf('/')) +
        this.options.categoryUrlSuffix;
        else
        // In other case - try to resolve it from referrer (without parameters).
        categoryUrl = document.referrer;

        if (categoryUrl.indexOf('?') > 0)
        categoryUrl = categoryUrl.substr(0, categoryUrl.indexOf('?'));



        return categoryUrl;

        );

        return $.mage.breadcrumbs;
        ;
        );


        after do setup upgrade and deploy. in product page breadcrumb is visible.






        share|improve this answer













        Porto has removed breadcrumb from home page that's why its not displayed in home page.



        For product page , breadcrumb is not visible its because of magento bug 2.2.4. to solve this issue override breadcrumb.js file from your current theme.




        app/design/frontend/Smartwave/Porto/Catalog/view/frontend/web/js/product/breadcrumbs.js




        /**
        * Copyright © Magento, Inc. All rights reserved.
        * See COPYING.txt for license details.
        */

        define([
        'jquery',
        'Magento_Theme/js/model/breadcrumb-list'
        ], function ($, breadcrumbList)
        'use strict';

        return function (widget)

        $.widget('mage.breadcrumbs', widget,
        options:
        categoryUrlSuffix: '',
        useCategoryPathInUrl: false,
        product: '',
        categoryItemSelector: '.category-item',
        menuContainer: '[data-action="navigation"] > ul'
        ,

        /** @inheritdoc */
        _render: function ()
        this._appendCatalogCrumbs();
        this._super();
        ,

        /**
        * Append category and product crumbs.
        *
        * @private
        */
        _appendCatalogCrumbs: function ()
        var categoryCrumbs = this._resolveCategoryCrumbs();

        categoryCrumbs.forEach(function (crumbInfo)
        breadcrumbList.push(crumbInfo);
        );

        if (this.options.product)
        breadcrumbList.push(this._getProductCrumb());

        ,

        /**
        * Resolve categories crumbs.
        *
        * @return Array
        * @private
        */
        _resolveCategoryCrumbs: function ()
        var menuItem = this._resolveCategoryMenuItem(),
        categoryCrumbs = [];

        if (menuItem !== null && menuItem.length)
        categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));

        while ((menuItem = this._getParentMenuItem(menuItem)) !== null)
        categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));



        return categoryCrumbs;
        ,

        /**
        * Returns crumb data.
        *
        * @param Object menuItem
        * @return Object
        * @private
        */
        _getCategoryCrumb: function (menuItem)
        return
        'name': 'category',
        'label': menuItem.text(),
        'link': menuItem.attr('href'),
        'title': ''
        ;
        ,

        /**
        * Returns product crumb.
        *
        * @return Object
        * @private
        */
        _getProductCrumb: function ()
        return
        'name': 'product',
        'label': this.options.product,
        'link': '',
        'title': ''
        ;
        ,

        /**
        * Find parent menu item for current.
        *
        * @param Object menuItem
        * @return null
        * @private
        */
        _getParentMenuItem: function (menuItem)
        var classes,
        classNav,
        parentClass,
        parentMenuItem = null;

        if (!menuItem)
        return null;


        classes = menuItem.parent().attr('class');
        classNav = classes.match(/(nav-)[0-9]+(-[0-9]+)+/gi);

        if (classNav)
        classNav = classNav[0];
        parentClass = classNav.substr(0, classNav.lastIndexOf('-'));

        if (parentClass.lastIndexOf('-') !== -1)
        parentMenuItem = $(this.options.menuContainer).find('.' + parentClass + ' > a');
        parentMenuItem = parentMenuItem.length ? parentMenuItem : null;



        return parentMenuItem;
        ,

        /**
        * Returns category menu item.
        *
        * Tries to resolve category from url or from referrer as fallback and
        * find menu item from navigation menu by category url.
        *
        * @return null
        * @private
        */
        _resolveCategoryMenuItem: function ()
        var categoryUrl = this._resolveCategoryUrl(),
        menu = $(this.options.menuContainer),
        categoryMenuItem = null;

        if (categoryUrl && menu.length)
        categoryMenuItem = menu.find(
        this.options.categoryItemSelector +
        ' > a[href="' + categoryUrl + '"]'
        );


        return categoryMenuItem;
        ,

        /**
        * Returns category url.
        *
        * @return String
        * @private
        */
        _resolveCategoryUrl: function ()
        var categoryUrl;

        if (this.options.useCategoryPathInUrl)
        // In case category path is used in product url - resolve category url from current url.
        categoryUrl = window.location.href.split('?')[0];
        categoryUrl = categoryUrl.substring(0, categoryUrl.lastIndexOf('/')) +
        this.options.categoryUrlSuffix;
        else
        // In other case - try to resolve it from referrer (without parameters).
        categoryUrl = document.referrer;

        if (categoryUrl.indexOf('?') > 0)
        categoryUrl = categoryUrl.substr(0, categoryUrl.indexOf('?'));



        return categoryUrl;

        );

        return $.mage.breadcrumbs;
        ;
        );


        after do setup upgrade and deploy. in product page breadcrumb is visible.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jun 27 '18 at 12:06









        Emipro Technologies Pvt. Ltd.Emipro Technologies Pvt. Ltd.

        2,8301 gold badge10 silver badges31 bronze badges




        2,8301 gold badge10 silver badges31 bronze badges






























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f231527%2fbreadcrumbs-not-displaying-in-frontend-and-admin-in-magento-2-2-4%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

            Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

            Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림