Hi,
The example below is in French but the problem can be encountered with other languages :
One top menu :

  • Name= L'association
  • link= nolink
  • url= l-association

Node content :

  • Name= Présentation
  • url= /l-association/presentation

" Include invalid paths alias as plain-text segments" = checked
"Use menu title when available" = checked

The rendered Breadcrumb :
L association / Présentation

The module use the path and not the menu link name, "L association" means nothing in French without the quote.
This module is useless in French with nolink menu items because French often use quotes.

Will this problem be taken care of by this great module or should we fall back on the menu_breadcrumb module?

Thank you

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

yom created an issue. See original summary.

gwvoigt’s picture

Version: 2.0.2 » 2.x-dev

Same as If I'm using an & as in a menu item that is a named "Programs & Courses". The path will be .../programs-courses/... and the breadcrumb will render "... / Programs Courses / ...". If it is a , it should use the menu link name and render "... / Programs and Courses / ...".

ankitjhakal made their first commit to this issue’s fork.

sunlix’s picture

Same with this structure

URL: /service-departments/service-1

  • Service & Departments (Link: <button>)
    • - Service 1
    • - Service 2

Expected: Service & Departments / Service 1
Got: service deparments / Service 1

admirlju’s picture

There is a workaround, but it's not the best. This should really get implemented.

I'll explain the workaround, but the problem is if you have a lot of menus and submenus with special characters it's a lot of work.

You have Paths to replace with custom breadcrumbs configuration, and can use it like this:
Example for node path (/articles/random/ (where I'll add a special character in random):
regex!/articles/random/\d :: Article | /articles :: Ran'dom | /articles/random :: <title>
Example for view/page path (/articles/random)
/articles/random :: Article | /articles :: Ran'dom

For your French example, it would probably look something like this, you'd need to have 3 entries and this is why it's annoying:
I'm demonstrating here if the content is represented with ID in the URL (if you use a string you can replace \d with .+):
/l-association :: L'association // Home > L'association
/l-association/presentation :: L'association | /l-association :: Présentation // Home > L'association > Présentation
regex!/l-association/presentation/\d :: L'association | /l-association :: Présentation | /l-association/presentation :: <title> // Home > L'association > Présentation > Content title

The last entry needs to use regex because it captures every possible combination. The <title> tag will use the content title, so it should correctly use special characters.

To understand better, the first part (up to the first :: separator) is pattern matching, this can either be string matching or regex matching.
From this point on you are building a custom breadcrumb, :: separator is used to separate text and URL to use on that text, | separates different crumbs. You can leave out the URL as I do with the last element. So: <first text> :: <first url> | <second text> :: <second url> | <n-th text>

seutje’s picture

Status: Active » Closed (cannot reproduce)

Can't reproduce on 2.0.9.

Created 2 nested pages with both "'" and "&" in the title and both rendered fine in the breadcrumb.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.