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: 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

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)

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)

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

#4

Bart Rylant

I have translated them all but no change….

#5

Bart Rylant

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

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

#7

BoldMinded (Brian)

Comment so I get updates on the right account.

#8

Bart Rylant 1

I’ve added the parameter

#9

Bart Rylant

But still no luck

#10

Bart Rylant

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

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

#12

Bart Rylant

(sorry for all the posts)

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

#13

BoldMinded (Brian)

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)

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

#15

Bart Rylant

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

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)

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

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

#19

BoldMinded (Brian)

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

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

#21

BoldMinded (Brian)

test

#22

Bart Rylant

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)

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

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