Hi,
I am trying Path Breadcrumbs again on a new project after over a year since I tried it previously.. Seem to be having similar issues though..
I have a content type with a field collection field.. When viewing a field collection item I want the breadcrumb to show a link back to the main content.. I couldn't find a way to do this directly.. I also have an entity reference field in the field collection referring back to the main content but that does't help either..
The issue as I see it is that while the substitutions are working for the "Link Title" they are not working for the "Link Path".. The paths are coming out as the actual content of the "Link Path" field..
So so using %FCID:url
in both the "link title" and "link path" generated this as the html link..
<a href="/%FCID%3Aurl">https://site.com/field-collection/field-pat-fc-treat/37</a>
So the substitution is being used for the title but doesn't appear to be working for the path..
Any thoughts on why not?
Comment | File | Size | Author |
---|---|---|---|
#6 | 2015-02-04_14-54-47.png | 23.9 KB | kalabro |
#5 | Screenshot 2015-02-04 12.39.02.png | 30.57 KB | Adirael |
#5 | Screenshot 2015-02-04 12.36.45.png | 35.05 KB | Adirael |
Comments
Comment #1
wipeout_dude CreditAttribution: wipeout_dude commentedComment #2
kalabroHello @wipeout_dude!
Please provide your PB item export and screenshot with your fields names (admin/structure/types/manage/%node_type/fields).
Best,
Kate
Comment #3
Adirael CreditAttribution: Adirael commentedI'm having the same issue. When I use context placeholders on the link path they are not replaced with their values. They work on the link title though. I end up with a link that looks like this:
<a href="/en/%CEnter%3Aurl">Test center</a>
In
_path_breadcrumbs_build_breadcrumbs
function (path_breadcrumbs.module:181
) the following code is executed, encoding the % symbol in the $paths variable. I think that's the cause for this issue.I'm not sure if this is the cause, but commenting that line fixes it for me. It was introduced as a fix to #2118329
Comment #4
kalabroCould you please post exact token name that is not replaced after rawurldecode?
Comment #5
Adirael CreditAttribution: Adirael commentedThis are my options. The tokens on path title are replaced, the ones on the path link aren't
And my arguments
According to XDebug, on
path_breadcrumbs.module:179
$paths
value is set toThen on 182 is replaced by
Comment #6
kalabroThis is why I asked: #2394337: Link %variable broken by rawurldecode()
PB now disallows some token names on the first step. Just rename %center to some other name.
Comment #7
Adirael CreditAttribution: Adirael commentedThat explains why it wasn't happening everywhere, in other breadcrumbs I was just using %node.
Thanks a lot!