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, 2015Hello,
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
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.
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?
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.
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
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.
BoldMinded (Brian)
… assuming the issues still exist.
BoldMinded (Brian)
You also put EE 3 as the version of EE that you’re using… Publisher does not work in EE 3 yet.
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.
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
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.
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) JOINexp_publisher_data
AS d ONt
.entry_id
=d
.entry_id
JOINexp_channel_titles
AS ct ONct
.entry_id
=t
.entry_id
JOINexp_channel_data
AS cd ONct
.entry_id
=cd
.entry_id
JOINexp_channels
AS c ONc
.channel_id
=t
.channel_id
JOINexp_members
AS m ONm
.member_id
=t
.author_id
WHEREt
.publisher_status
= ‘open’ ANDd
.publisher_status
= ‘open’ ANDt
.publisher_lang_id
= 2 ANDd
.publisher_lang_id
= 2 ANDt
.entry_id
IN (‘11’)Filename: third_party/publisher/models/publisher_entry.php
Line Number: 1402
BoldMinded (Brian)
You need to run the module updates from the Modules CP page.
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
BoldMinded (Brian)
Did you try it in a clean/new EE environment with only Publisher installed, no other add-ons?
Jérôme Canon
I tried with a new EE environment (new index.php, new config.php) but there are other add ons installed.
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.
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
Jérôme Canon
So now i have the good language loaded but not the good url prefix.
BoldMinded (Brian)
Do you have all the languages defined in the Languages settings page?
Jérôme Canon
yes i have two languages set.
fr -> default language nl
Jérôme Canon
And for the domain i want to override the language i juste needed NL language.
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.
BoldMinded (Brian)
Looks like a bug. See next post…
BoldMinded (Brian)
Comment has been marked private.
Jérôme Canon
I tried your new build but with no success :-(
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
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 ?
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.
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
BoldMinded (Brian)
Clear your cookies.
Jérôme Canon
I already tried.
BoldMinded (Brian)
Reupload the files. There is no way those errors should be occurring.
BoldMinded (Brian)
I read that error message wrong yesterday, sorry was a busy day.
BoldMinded (Brian)
Try this build: https://www.dropbox.com/s/8wxfyj0jek5jtfl/publisher-169-44b37040.zip?dl=0
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 !
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.