Problem/Motivation

The breadcrumb builder currently retrieves the current interface language instead of the content language, which can cause problems when the site has a fixed interface language with varying content languages.

Proposed resolution

The "getCurrentLanguage" call should pass "LanguageInterface::TYPE_CONTENT" so that the content language is retrieved instead of the interface language, which is the default. This change seems to make sense and this is also similar to how something like the "menu_breadcrumb" module currently handles this.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Chewi3 created an issue. See original summary.

chewi3’s picture

I added a patch with my proposed change. Please review.

chewi3’s picture

Status: Active » Needs review
greg boggs’s picture

Status: Needs review » Needs work

Can we get this as a merge request?

https://www.gregboggs.com/drupal-merge-requests/

omkar-pd made their first commit to this issue’s fork.

omkar-pd’s picture

Status: Needs work » Needs review

Opened MR of patch #2.

  • Greg Boggs committed 55d62af on 2.x authored by omkar-pd
    Issue #3283456 by omkar-pd, Chewi3, Greg Boggs: BreadcrumbBuilder checks...
greg boggs’s picture

Status: Needs review » Fixed
greg boggs’s picture

Thank you Omkar!

Don't forget to give yourself credit next time your employer asks you about your accomplishments!

https://twitter.com/gregory_boggs/status/1541868735060779010

omkar-pd’s picture

Version: 2.0.2 » 2.x-dev

Sure, Thank you, Greg.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.