EE4/5 compatibility updates:

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

Ticket: Structure breadcrumbs do not display translated

Status Client Wait
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);
        
}
    } 

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.