Created on 30 May 2025, 3 months ago

I'm just looking for more information on the future of version 2.0. Right now we're using the breadcrumb module in 1.6, but it appears that's removed in 2.0. Is that correct? Are there plans to integrate it back into 2.0?

πŸ’¬ Support request
Status

Active

Version

2.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States matia.ward

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @matia.ward
  • πŸ‡ΊπŸ‡ΈUnited States matia.ward
  • πŸ‡ΊπŸ‡¦Ukraine goodboy Kharkiv, Ukraine

    @matia.ward, I decided to add breadcrumb into Decoupled Kit Block (2.0.3 version).
    Please, see system_breadcrumb_block block and settings/breadcrumb section in the resulted JSON.

  • πŸ‡ΊπŸ‡ΈUnited States matia.ward

    Not sure if I'm doing something wrong, but it seems to give back the same breadcrumbs regardless of what the custom_path string is:

    "settings": {
              "id": "system_breadcrumb_block",
              "label": "Breadcrumbs",
              "label_display": "0",
              "provider": "system",
              "breadcrumb": [
                {
                  "text": "Home",
                  "url": "/"
                },
                {
                  "text": "Jsonapi",
                  "url": "/jsonapi"
                }
              ]
            },

    The breadcrumb output should change based on that variable, correct? Example URL string (whitelisted IPs only, so you won't be able to view the JSON): https://drupal.nidentistry.devsr.com/jsonapi/decoupled_kit/blocks?curren...

  • πŸ‡ΊπŸ‡¦Ukraine goodboy Kharkiv, Ukraine

    @matia.ward, ah, sorry, you are right. Core breadcrumb doesn't know how to construct breadcrumb correctly (it uses $this->context->getPathInfo() istead of $route_match data). Try to use Easy breadcrumb β†’ or similar modules.

  • πŸ‡ΊπŸ‡¦Ukraine goodboy Kharkiv, Ukraine

    @matia.ward, I did commit to dev version, please check.

  • Status changed to Needs review about 13 hours ago
  • πŸ‡ΊπŸ‡ΈUnited States matia.ward

    I updated a site to the 2.0 dev version and looked at the json response using this url: /jsonapi/decoupled_kit/blocks?current_path=/testimonials/single-post&current_theme=gin. My response now includes the parent page! The indexing is off though, goes from 0 then 2:

    "drupal_internal__id": "gin_breadcrumbs",
            "theme": "gin",
            "region": "breadcrumb",
            "weight": 0,
            "provider": null,
            "plugin": "system_breadcrumb_block",
            "settings": {
              "id": "system_breadcrumb_block",
              "label": "Breadcrumbs",
              "label_display": "0",
              "provider": "system",
              "breadcrumb": {
                "0": {
                  "text": "Home",
                  "url": "/"
                },
                "2": {
                  "text": "Testimonials",
                  "url": "/testimonials"
                }
              }
            },

    Tested with another nested child and got even more index weirdness, lol. This path was /testimonials/single-post/another-child.

    "breadcrumb": {
                "0": {
                  "text": "Home",
                  "url": "/"
                },
                "2": {
                  "text": "Single Post",
                  "url": "/testimonials/single-post"
                },
                "3": {
                  "text": "Testimonials",
                  "url": "/testimonials"
                }
              }

    I think just fixing up the indexing would do it! Thank you!

    • ab0c5791 committed on 2.x
      Issue #3527486: Version 2.0 and Breadcrumbs
      
  • πŸ‡ΊπŸ‡¦Ukraine goodboy Kharkiv, Ukraine

    @matia.ward, many thanks for your testing.
    I've fixed that case, please test it on the dev version.
    But the right way is to use contributed breadrumb modules like Easy breadcrumb β†’ .

Production build 0.71.5 2024