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: Error in EntryResult.php query filtering

Status Resolved
Add-on / Version Publisher 2.7.10
Severity
EE Version 4.2.1

BoldMinded (Brian)

Apr 19, 2018

 


Description:
When we switch from our default language to say German
The website switches and the German page loads
But on our language switcher any options in the select after German the text disappears

 

Detailed steps to reproduce the issue:
1.Go to the home of page of the website
2. Select any language
3. Then once the page has refreshed check the language switcher select. Any of the languages after the language you selected are missing their name
4: Repeat for any language

 

 

 

 

 

#1

BoldMinded (Brian)

Can you share what the template code looks like to render that drop down?

Did you verify that all the Phrases > Languages have translations?

#2

BoldMinded (Brian)

Comment has been marked private.

#3

Cameron Ross

Hi

<select class=”form-control lingo” = this.options[this.selectedIndex].value;”> {exp:publisher:languages} <option value=”{switch_language_url}” {if is_active == 1}selected{/if}>{short_name} - {long_name}</option> {/exp:publisher:languages} </select>

But if you select say turkey all the {long_name} display previous to this

It worked on on the ee2 site before we upgraded

Maybe something has changed?

#4

BoldMinded (Brian)

Publisher 2 doesn’t do automatic default language fallback lookups for phrases and categories. You need to explicitly add the translation, e.g. fill in the blank fields in my screenshot above, then save the phrase.

#5

Cameron Ross

Thanks I will add them

#6

BoldMinded (Brian)

Just checking in to see if adding the translations fixed the issue?

#7

Cameron Ross

Hi Brian

Yes it works

Thamks

#8

Cameron Ross

Comment has been marked private.

#9

BoldMinded (Brian)

I’m guessing that has something to do with your prefix settings.

#10

Cameron Ross

Comment has been marked private.

#11

BoldMinded (Brian)

Can you provide the login to your cp so I can take a look?

Also, did you clear all your cache?

#12

Cameron Ross

Comment has been marked private.

#13

BoldMinded (Brian)

Actually, before I look into this, can you make a new template and add just the language switcher to it so its in a non-working state by itself and not with other template tags around it.

#14

Cameron Ross

Comment has been marked private.

#15

BoldMinded (Brian)

1) Not sure if this is a new bug or if its been like this for awhile. If you go to the home page it will automatically add /en/, but apparently it’s not doing it on child pages. I’ll have to look into this one and it may be a few days before I have an answer.

2) This isn’t a url translation issue. Its showing a 404 b/c that is what you have the redirect set to. The French version of that entry does not appear to have a translated url value? If you view my updated template and hover over the link “translated_url: Français” you’ll see that there is no 4th segment. The language segment does not count as segment_1, your first segment is “healthy-living”. So it was a problem with your template code. It is working now: http://www.eufic.org/en/healthy-living/test-article/the-goodness-in-potatoes

#16

Cameron Ross

Comment has been marked private.

#17

BoldMinded (Brian)

Yes, there is the Content Fallback setting.

#18

Cameron Ross

Comment has been marked private.

#19

BoldMinded (Brian)

It appears to work if the limit=”1” parameter is removed

{exp:channel:entries channel="healthy-living" url_title="{publisher:segment_3}" dynamic="no" disable="member_data|pagination" publisher_fields="y" require_entry="yes"}

Is it possible for you to update the ticket to provide FTP access so I can debug this a little further?

#20

BoldMinded (Brian)

Comment has been marked private.

#21

Cameron Ross

Comment has been marked private.

#22

BoldMinded (Brian)

Ok, I think it was an easy fix. You can grab the Service/Entry/EntryResult.php file from your staging site or I can send a new build. It was just a 1 line change.

#23

Cameron Ross

Great

I copied it across

I think my last issue is that /en/ is not been added to add links?

It gets added to the home page but if click on my main menu sub items

http://stage.eufic.org/healthy-living/category/eating-sustainably/

maybe its a setting

#24

BoldMinded (Brian)

Ok, I think that one is fixed too, but I want to do some more testing locally b/c whenever I change something related to the language switching and prefixing I need to thoroughly test it.

Grab the Service/Session.php file, it too has a 1 line change in it to fix the issue.

#25

BoldMinded (Brian)

Cameron, I re-opened this ticket b/c the change made to the EntryResult.php file is not the correct change. Its breaking other sites. I can look into this again for you but you’ll need to re-add the CP and FTP info to the staging site, and hopefully the healthy-living/test-article/the-goodness-in-potatoes template and entry still exist so I can do some further testing with it.

#26

Cameron Ross

Comment has been marked private.

#27

BoldMinded (Brian)

Try updating to the latest version. I know for sure it’ll fix issue #1. Update a dev or staging site first and backup the DB just incase.

#28

BoldMinded (Brian)

Closing due to inactivity.

Login to reply