Be sure to checkout our newest add-on Reading Time Pro!

EE4 compatibility updates:

  • Publisher is EE4 and EE5 compatible, but it does not currently support the Fluid field (it's in the works).
  • Reel is EE4 and EE5 compatible, but it does not currently support the Fluid field.

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)

Mar 11, 2019

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

#2

BoldMinded (Brian)

Mar 11, 2019

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)

Mar 11, 2019

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

#4

Hop Studios

Mar 12, 2019

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)

Mar 12, 2019

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)

Mar 26, 2019

Were you able to figure this out?

#7

BoldMinded (Brian)

Apr 01, 2019

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)

Apr 23, 2019

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)

Apr 23, 2019

test

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.