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: MSN one language for a domain

Status Resolved
Add-on / Version Publisher 1.6.3
Severity
EE Version 3

Jérôme Canon

Dec 04, 2015

Hello,

I have A EE Project who suppose to work on two different domains.

For one domain, i need to have two language et a dectect browser language.

It’s ok with the first domain bug for the second i need to force only one specificic language!

It’s possible ?

Thanks

#1

Jérôme Canon

Hello,

Finally, i don’t need to use MSM but i try to override the language for a specific domain.

I put this code in my config.php :

if ($_SERVER[‘SERVER_NAME’] == ‘mydomain.nl’) { $config[‘publisher_lang_override’] = ‘nl’; }

But it’s not working. Do you have a solution for me please ?

Thanks.

#2

BoldMinded (Brian)

That was the solution I was going to provide, which is designed to work, and has worked, with other customers.

Can you take a screenshot of your Publisher settings page or submit the support form from the Publisher drop down menu in your CP?

#3

BoldMinded (Brian)

I see you purchased the Domain and Language control add-ons. If you are using the config.php override option make sure those 2 extensions are turned off.

#4

Jérôme Canon

Yes but it’s for an other project 😊

In fact, i have several errors with my publisher. When i try to submit support forum, i have this :

A PHP Error was encountered Severity: Notice Message: Undefined property: Publisher_helper_cp::$base_url Filename: publisher/mcp.publisher.php Line Number: 237

For this site, i need to have different domains but one admin. So i modified my config.php and i think it’s create problem in publisher :

$config[‘app_version’] = ‘2.10.1’; $config[‘license_contact’] = ‘curious@hilarious.be’; $config[‘license_number’] = ‘3767-5980-1946-1183’; $config[‘debug’] = ‘1’; $config[‘doc_url’] = ‘http://ellislab.com/expressionengine/user-guide/’; $config[‘is_system_on’] = ‘y’; $config[‘allow_extensions’] = ‘y’; $config[‘cache_driver’] = ‘file’; $config[‘cookie_prefix’] = ”; $config[‘cookie_httponly’] = ‘y’;

$protocol = (isset($_SERVER[“HTTPS”]) && $_SERVER[“HTTPS”] == “on”) ? “https://” : “http://”; $base_url = $protocol . $_SERVER[‘HTTP_HOST’]; $base_path = $_SERVER[‘DOCUMENT_ROOT’]; $system_folder = “system”; $images_folder = “images”; $images_path = $base_path . “/” . $images_folder; $images_url = $base_url . “/” . $images_folder; $config[‘index_page’] = “”; $config[‘base_url’] = $base_url . “/”; $config[‘site_url’] = $config[‘base_url’]; $config[‘cp_url’] = $config[‘base_url’] . $system_folder . “/index.php”; $config[‘theme_folder_path’] = $base_path . “/themes/”; $config[‘theme_folder_url’] = $base_url . “/themes/”; $config[‘tmpl_file_basepath’] = APPPATH . “templates/”; $config[‘emoticon_path’] = $images_url . “/smileys/”; $config[‘captcha_path’] = $images_path . “/captchas/”; $config[‘captcha_url’] = $images_url . “/captchas/”; $config[‘avatar_path’] = $images_path . “/avatars/”; $config[‘avatar_url’] = $images_url . “/avatars/”; $config[‘photo_path’] = $images_path . “/member_photos/”; $config[‘photo_url’] = $images_url . “/member_photos/”; $config[‘sig_img_path’] = $images_path . “/signature_attachments/”; $config[‘sig_img_url’] = $images_url . “/signature_attachments/”; $config[‘prv_msg_upload_path’] = $images_path . “/pm_attachments/”;

if ($_SERVER[‘SERVER_NAME’] == ‘biotherm.nl’) { $config[‘publisher_lang_override’] = ‘nl’; }

Thanks for you help

#5

BoldMinded (Brian)

Well, first you’re running a very old version of Publisher. The first thing to do is upgrade to 1.6.8. Then from there I can help.

#6

BoldMinded (Brian)

… assuming the issues still exist.

#7

BoldMinded (Brian)

You also put EE 3 as the version of EE that you’re using… Publisher does not work in EE 3 yet.

#8

Jérôme Canon

I’m still in EE 2.10.1 finally because i saw you’re stil developing publisher for EE3

I updated my publisher version and ‘ill let you know if it’s ok.

Thanks for your quick answer.

#9

Jérôme Canon

OK, sorry for this stupid question but i download the 1.6.9 version and i copy the downloaded files in my ftp and now i have blank page.

I have a backup so no worries but there is a way to upgrade Publisher ?

Thanks

#10

BoldMinded (Brian)

That is how you upgrade. See this if you’re getting a white screen https://boldminded.com/white-screen.

Do you have a local environment to test in instead of uploading to FTP immediately? I hope you’re not upgrading a live site without testing locally first.

#11

Jérôme Canon

I have a staging environment.

This is the error i have :

Error Number: 1054

Unknown column ‘t.author_id’ in ‘on clause’

SELECT ct.*, cd.*, t.*, d.*, c.*, m.*, ct.url_title AS default_url_title, t.title AS title FROM (exp_publisher_titles AS t) JOIN exp_publisher_data AS d ON t.entry_id = d.entry_id JOIN exp_channel_titles AS ct ON ct.entry_id = t.entry_id JOIN exp_channel_data AS cd ON ct.entry_id = cd.entry_id JOIN exp_channels AS c ON c.channel_id = t.channel_id JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.publisher_status = ‘open’ AND d.publisher_status = ‘open’ AND t.publisher_lang_id = 2 AND d.publisher_lang_id = 2 AND t.entry_id IN (‘11’)

Filename: third_party/publisher/models/publisher_entry.php

Line Number: 1402

#12

BoldMinded (Brian)

You need to run the module updates from the Modules CP page.

#13

Jérôme Canon

Hello,

I updated publisher but unfortunately the override in config.php file still not working :-(

I check if my condition is ok but no problem with that.

Any Idea ?

Thanks

#14

BoldMinded (Brian)

Did you try it in a clean/new EE environment with only Publisher installed, no other add-ons?

#15

Jérôme Canon

I tried with a new EE environment (new index.php, new config.php) but there are other add ons installed.

#16

BoldMinded (Brian)

I mean a brand new EE install, with a fresh install of Publisher. No changes to the Publisher or EE config except for adding that $_SERVER conditional above.

#17

Jérôme Canon

OK i think it’s working. I had this option activated :

Add URL prefix? -> Yes.

When i set to No, the domain load the good language.

But if i desactivate the option add url prefix to homage, i have an error :

A PHP Error was encountered Severity: Notice Message: Undefined offset: 1 Filename: models/publisher_language.php Line Number: 502

#18

Jérôme Canon

So now i have the good language loaded but not the good url prefix.

#19

BoldMinded (Brian)

Do you have all the languages defined in the Languages settings page?

#20

Jérôme Canon

yes i have two languages set.

fr -> default language nl

#21

Jérôme Canon

And for the domain i want to override the language i juste needed NL language.

#22

Jérôme Canon

Interesting to know :

When i set Dutch in default language, set no to “Get language from browser?”, clear all my cookies, the url prefix is still /fr so the french prefix.

#23

BoldMinded (Brian)

Looks like a bug. See next post…

#24

BoldMinded (Brian)

Comment has been marked private.

#25

Jérôme Canon

I tried your new build but with no success :-(

#26

BoldMinded (Brian)

I just tested it, it works. Remove the conditional, just put this in your config

$config[‘publisher_lang_override’] = ‘nl’;

These are the settings I tested with. Try matching yours. https://www.dropbox.com/s/hr758cvx6sqrs7q/Screenshot 2015-12-07 16.15.30.png?dl=0

#27

Jérôme Canon

The override is ok but i always have this error appears on the site :

A PHP Error was encountered Severity: Notice Message: Undefined offset: 1 Filename: models/publisher_language.php Line Number: 502

Maybe an other plugin in conflict ?

#28

BoldMinded (Brian)

In order for that error to appear its basically saying you don’t have a default language defined, which is why I asked about your configured languages.

#29

Jérôme Canon

In firefox i have multiple errors but not in safari. it’s crazy :-(

A PHP Error was encountered Severity: Notice Message: Undefined offset: 1 Filename: models/publisher_language.php Line Number: 502

A PHP Error was encountered Severity: Notice Message: Undefined offset: 3 Filename: hooks/Publisher_hooks_base.php Line Number: 347

A PHP Error was encountered Severity: Warning Message: array_merge(): Argument #1 is not an array Filename: hooks/Publisher_hooks_base.php Line Number: 349

A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: hooks/Publisher_hooks_base.php Line Number: 351

A PHP Error was encountered Severity: Notice Message: Undefined offset: 3 Filename: hooks/Publisher_hooks_base.php Line Number: 358

A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: hooks/Publisher_hooks_base.php Line Number: 358

#30

BoldMinded (Brian)

Clear your cookies.

#31

Jérôme Canon

I already tried.

#32

BoldMinded (Brian)

Reupload the files. There is no way those errors should be occurring.

#33

BoldMinded (Brian)

I read that error message wrong yesterday, sorry was a busy day.

#34

BoldMinded (Brian)

Try this build: https://www.dropbox.com/s/8wxfyj0jek5jtfl/publisher-169-44b37040.zip?dl=0

#35

Jérôme Canon

No problem 😊

But i cleaned my browser cookies and cache and modify my config.php and everything seems good now.

The override is ok ans i didn’t see any php errors so i think it’s a victory 😊

Thanks for the great support !

#36

BoldMinded (Brian)

Ah, good to know. You probably still want to try that build though b/c that error is a side effect from a recent Grid bug fix.

Login to reply