Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Structure breadcrumbs do not display translated

Status Resolved
Add-on / Version Publisher 2.10.7
Severity
EE Version 5.1.2

Hop Studios

Mar 11, 2019

Structure is listed as a supported add-on, so I’m not sure if this is a bug or if something just isn’t clear in the documentation.
Breadcrumbs don’t seem to be translating correctly.

Using this template code:

{exp:structure:breadcrumb channel:title="publisher" inc_here="yes" separator="" wrap_each="li" inc_home="yes" here_as_title="yes" }

I’ve ended up using

rename_home="{phrase:home}"

for the Home breadcrumb base, but the page title is always displayed in English.

#1

BoldMinded (Brian)

Are all of them not translated or just the home link? I need more specific info.

#2

BoldMinded (Brian)

In my local test only my Home breadcrumb was not translated, and it appears to be a Structure issue b/c my hook is returning translated results to it. https://d.pr/i/cgIZFt

#3

BoldMinded (Brian)

“Zuhause” is “Home” in German. I’m pretty certain this is a Structure issue.

#4

Hop Studios

Hi Brian, The “Home” link is translating correctly when I add the rename_home param, so that part is less of a problem.

With or without rename_home, the entry titles are not shown translated. That’s the larger problem.

#5

BoldMinded (Brian)

In legacy/libraries/hooks/Publisher_structure_hooks.php line 435, add a var_dump to see if it’s returning the translated values. If it’s returning the translated values, then it may still be on the Structure side of things

// Save it
        $this->requestCache->set('custom_titles', $page_titles);
var_dump($page_titles);
        return $page_titles;

You can also check the structure_create_custom_titles method on line 68. Maybe it is returning an improper cache of the translations? If something else generated non-translated versions of the texts, then it could be returning the cached version.

public function structure_create_custom_titles($custom_titles)
    {
        if ($this->requestCache->get('custom_titles'))
        {
            return $this->requestCache->get('custom_titles');
        }
        else
        {
            return $this->create_custom_titles($custom_titles);
        }
    }
#6

BoldMinded (Brian)

Were you able to figure this out?

#7

BoldMinded (Brian)

I’m going to close this ticket b/c I feel like it is most likely a Structure issue. If more information can be provided I can take another look at it, but from what I can tell the hook in Publisher is returning the correct data to Structure.

#8

BoldMinded (Brian)

Sounds like Jace tracked this down as a Publisher bug. Sorry about that. This is the change that will be reflected in the next Publisher release to fix the issue. https://d.pr/i/ufTiZS

#9

BoldMinded (Brian)

test

Login to reply