Publisher is EE6 compatible, but it does not support the Fluid field. 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: No languages found?

Status Resolved
Add-on / Version Publisher
Severity Critical
EE Version 17

Bart Rylant

Dec 12, 2012

Hi

I’ve installed Publisher for my first time use with multiple languages. I’ve added a second language, set it to Enabled offcourse. Both languages are visible in the CP, however, the front-end reacts as if there are no languages available.

{exp:publisher:switcher}

outputs an empty dropdown and

{exp:publisher:languages}
     {short_name}
     {long_name}
     {id}
     {is_default}
     {is_enabled}
     {direction}
     {switch_language_url}
    {/exp:publisher:languages}

outputs

{short_name} {long_name} {id} {is_default} {is_enabled} {direction} {switch_language_url}

Dit I do something wrong somewhere?

I’m adding access details so you can check it out.

#1

Bart Rylant

Dec 12, 2012

By the way: I have set “dutch” as the default language, but in the Structure tree it shows the English (= not default language) title.

#2

BoldMinded (Brian)

Dec 12, 2012

This is a bug I just found the other day. Go to phrases and edit English, you need to add an English translation.

#3

BoldMinded (Brian)

Dec 12, 2012

Basically make sure all the language phrases have a default translation.

#4

Bart Rylant

Dec 14, 2012

I have translated them all but no change….

#5

Bart Rylant

Dec 14, 2012

Well, it does display the urls instead of variable names now, but everything goes back to the default language and the ACT urls don’t do anything.

http://staging.sintlucasantwerpen.be/nl/actueel

#6

Brian Litzinger

Dec 14, 2012

Can you add style=“links” to the switcher tag?

#7

BoldMinded (Brian)

Dec 14, 2012

Comment so I get updates on the right account.

#8

Bart Rylant 1

Dec 14, 2012

I’ve added the parameter

#9

Bart Rylant

Dec 16, 2012

But still no luck

#10

Bart Rylant

Dec 16, 2012

I’m really stuck with this one. I uninstalled publisher, removed all posts, installed publisher again,... No change. Language switcher doesn’t switch languages, url’s are messed up, and now I even can’t edit the page I’ve just added via Structure. It’s greyed out (and it shows the English title although Dutch is set as default.) Maybe it has something to do with English being not the default language?

I just tried to delete the English language, and it says:
An Error Was Encountered
The requested language (1) does not exist in the language array.

- Oh, and now the English language disappeared from the switcher.

#11

Bart Rylant

Dec 16, 2012

Ok. All the pages I add through Structure are not editable after posting. Very very strange.

#12

Bart Rylant

Dec 16, 2012

(sorry for all the posts)

http://staging.sintlucasantwerpen.be/nl/grafisch-ontwerp if you want to check it out

#13

BoldMinded (Brian)

Dec 16, 2012

Bart I will dig into this tomorrow night. Sorry for the delays but I left my laptop in the office all weekend.

#14

BoldMinded (Brian)

Dec 16, 2012

Is Dutch the language you have set to default AND the language you are entering all content in first?

#15

Bart Rylant

Dec 16, 2012

In my first attempt, Dutch was default but second. In my last attempt, Dutch is default and forst language, but the problem is the same.

(If you want to chat about this on skype instead of doing everything through the forums here, just let me know.)

Thanks for your time!

#16

Bart Rylant

Dec 17, 2012

Here’s a roundup after starting all over with a fresh ExpressionEngine install and a fresh Structure and Publisher install;

- I’ve set English as default, Dutch as second language, just to test now (but it should be the other way around on the final site).
- Publishing anentry in 2 languages works fine now, the “greyed out"problem in Stucture seems to have disappeared.
- Using the language switcher on the front-end, the first swicth has effect. All switches after that result in going to the same url you are already on. (So the language doesn’t change.)
- If I want to edit the Dutch version of en entry, all the fields get populated with English data (I had already translated them, so the English shouldn’t load and shouldn’t replace the translated content.)

#17

BoldMinded (Brian)

Dec 17, 2012

Bart, it looks like an old variable was being used improperly. GO to line 215 of the models/publisher_entry.php file and change it from:

->where('publisher_lang_id', $this->default_language)

to:

->where('publisher_lang_id', $this->default_language_id)

I was able to replicate it still saving as English instead of German (my new default language), after this change it saved the titles as German properly and they showed up in Structure too.

#18

Bart Rylant

Dec 17, 2012

That one solves the back-end problem, but it doesn’t solve the switcher problem.

#19

BoldMinded (Brian)

Dec 17, 2012

Bart, would it be possible to add FTP information to this ticket? I can’t replicate the URL not switching locally. It would help if I could debug some variables as its trying to switch languages to see what the issue might be.

#20

Brian Litzinger

Dec 29, 2012

Bart, I can’t remember, have you gotten everything sorted out or still having issues?

#21

BoldMinded (Brian)

Dec 29, 2012

test

#22

Bart Rylant

Dec 30, 2012

This was your last reply:

Bart, I was able to look into this a bit, but unfortunately I don’t have a solution yet. I’ve seen this happen before, but it was when the user was linking assets from site_url, e.g. site.com/en/styles/file.css, which threw off the switcher. I updated your main template to use root_url so the assets are linking from the root all the time, but the switcher is still behaving abnormally, obviously. This is what I see in the log for a single language switch request:

...

This is what should be logged during a single switch request:

106 1 Publisher_session->set_language 1 1355884022 [“fr”,“nl”,“fr\/”]

So for some reason your site is trying to switch the language for each asset request, thus setting the cookie improperly. I’ll try to look at it again tomorrow.

 

I haven’t tested it with the updated version yet.

#23

BoldMinded (Brian)

Dec 30, 2012

I remember, sorry about that. Have you tried the new 0.97.3 build? If that doesn’t fix it for you then I might need FTP access again. It looks like you removed the info.

#24

Brian Litzinger

Jan 20, 2013

Bart, 0.97.6 will include an update that if it detects a .css, .js, .ico, or .html extension it will ignore those files, thus the language switching won’t get confused. Will release it early this week. If the problem still persists after that, just open a new ticket.

Login to reply