Hello all,
When you first navigate to the site http://www.cims-scic.ca the page does not automatically go to the language prefix which should be english.
The home page is http://www.cims-scic.ca/en/home but doesn't load as such. Which means that when you try to switch to French it doesn't work. Once you click on another page the language switcher works perfectly. It's just on the initial home page when you come in for example from a google search or use the url. I have been trying to find a fix for this all day. so far i've:
Set the languages as en and fr in langauge settings\
Set the path prefix with language feed back
Add the variable in the settings.php file for front page and set the two homepages. English home page being home and the french being accueil_fr
I have two seperate menus using nice menus module, and are set also with the variables to be language specific.
On a second site that I am working on I get the same issue but it shows up a little different. http://www.octevaw-cocvff.ca/new/
I think however, that the issue is the same. On this site when you click on the francais link after using the link above you get a permission denied page even though I am logged in as administrator!
My sense is that I've missed a simple setting but I've worked on this most of the day, reading through documentation but can't find it. Any help would be greatly appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | sitenameFR.jpg | 14.84 KB | avo webworks |
| #20 | sitenameEN.jpg | 11.66 KB | avo webworks |
Comments
Comment #1
brucepearson commentedFrom what you say your settings appear to be correct as far as I know.
I assume you have 'site_frontpage' in your settings file:
eg.
$conf['i18n_variables'] = array(
'menu_primary_links_source',
'menu_secondary_links_source',
'site_frontpage'
);
and then on http://www.cims-scic.ca/fr/admin/settings/site-information you have the front page set to "accueil_fr".
This should be all you need.
It's not working for you because http://www.cims-scic.ca/fr is not going to http://www.cims-scic.ca/fr/accueil_fr. I don't know why.
Comment #2
avo webworks commentedthank you for your response. A fresh night sleep and your return message has me thinking that it is something to do with the variables and the way I've set up my menus.
Here are my variables in my settings file:
$conf['i18n_variables'] = array(
// Site name, slogan, mission, etc..
'site_name',
'site_slogan',
'site_mission',
'site_footer',
'anonymous',
// Node help
'blog_help',
'story_help',
// User configuration
'user_registration_help',
'user_mail_welcome_subject',
'user_mail_welcome_body',
'user_mail_approval_subject',
'user_mail_approval_body',
'user_mail_pass_subject',
'user_mail_pass_body',
// Different front page for eah language
'site_frontpage',
// Primary and secondary links
'menu_primary_links_source',
'menu_secondary_links_source',
// Contact form information
'contact_form_information',
// For theme variables, read more below
'theme_settings',
'theme_garland_settings',
'theme_zen_settings',
);
However, I've created two menus:
en-mainmenu
fr-mainmenu
And in Blocks the settings are:
en-mainmenu - multilanguage setting: English pages - source menu settings: en-mainmenu
fr-mainmenu - multilanguage setting: French pages - source menu settings: fr-mainmenu
In the admin - site building - menus
en-mainmenu
fr-mainmenu
Navigation
Primary links
Secondary links
And in the settings tab on the menu page I have:
Default menu for content set to primary links
Source for the primary links: en-mainmenu (for the English site) fr-mainmenu (for the french site)
Source for the secondary links: No secondary links.
When I play around with those settings nothing changes even after I clear the cache and run cron. Same when I change the variable in the settings file from 'menu_primary_links_source', to 'menu_en_mainmenu_source',
I've set the home page in admin - settings - site information:
home
accueil_fr
it clearly shows on this page that it's a language variable and the address before shows the en and fr prefix respectively.
I think it has something to do with the way I've set up my menus but need some guidance.
Thank you for your help
Comment #3
brucepearson commentedEverything looks OK. Maybe it's a problem with the theme. Temporarily select the "Garland" theme and see if http://www.cims-scic.ca/fr then goes to the correct page.
Comment #4
avo webworks commentedThank you for your reply I hadn't thought of that and just tested. Sure enough same trouble but....
Through CSS I disabled the display of the translation switch at the bottom of the page ( a.translation-link {display:none;}) in my Zen subtheme CSS. However in Garland the translation link showed up as text on the bottom of the page and sure enough that link works just fine.
I've enabled it on the Zen theme as well for you to look at. How come that link works perfectly but the language switcher block doesn't?
Surely this means that the issue is not in the menu or with the paths but with the Language Switcher Block.
By the way as I though the issue is the same on both sites
http://www.cims-scic.ca
http://www.octevaw-cocvff.ca/new
I've enabled the text translation link on both sites and those works good just not the Language Switcher Block. The language switcher block has to work for both sites so any help would be greatly appreciated.
Any ideas anyone? I would really appreciate help as I am totally stumped on this one and it
Comment #5
brucepearson commentedIt still looks like the main problem is that the site_frontpage setting is not working. http://www.cims-scic.ca/fr is displaying http://www.cims-scic.ca/en/home.
1) Try commenting out the 'theme' variables in $conf['i18n_variables'] to see if this has an effect
2) Try just these variables to see what effect it has:
$conf['i18n_variables'] = array(
'menu_primary_links_source',
'menu_secondary_links_source',
'site_frontpage'
);
When you test just refresh this page to see if it displays the correct page. http://www.cims-scic.ca/fr
Comment #6
avo webworks commentedI've used only the variables mentioned above uploaded the settings files, cleared cache and run cron but still no luck.
Comment #7
brucepearson commentedCan you try adding this php code to a block:
Then view a page in English and French to see what it says but don't use the front page.
Try to view the test block on these pages:
http://www.cims-scic.ca/en/concept
http://www.cims-scic.ca/fr/Concept
Comment #8
avo webworks commentedHello,
First of all thank you for your help and staying with me to fix this problem.
I've added the block and whne you now view those pages as suggested:
http://www.cims-scic.ca/en/concept
http://www.cims-scic.ca/fr/Concept
the english page says home in the block
the french accueil_fr
I've left the block in place (on the right hand side) for you to see.
Let me know when you've seen it so I can remove it again.
thanks again
Comment #9
brucepearson commentedI've had a look and they look correct. I'm not sure what else to do to try to find the problem.
Comment #10
avo webworks commentedThank you for your help I am going to create a test site and see where I went wrong and if I can create a site without this problem. I'll keep it simple no theme no other modules and slowly keep adding....
In the meantime is there anyone else who has any ideas?
Comment #11
avo webworks commentedSo I've created a test site to see what is happening.
I've installed a clean copy of drupal:
Enabled modules:
Content Translation
Locale
Path
Block Translation
Content Type Translation
Internationalization
String Translation
Syncronize Translation
Taxonomy Translation
Enabled the language block and added it to the header.
Created two pages - home and accueil both of which have a path called home
In site information set homepage to home
At this stage already the language block is not recognizing the home page.
http://www.annelies.ca/cims/
Great sees the home page. Now click on the language switch to see in French and get a 403 Forbidden page. Do a back button in the browser and get a 403 Forbidden page on the /en as well. It just won't go to the fr/home or en/home
I have now add the setting.php file variables but that makes absolutely no difference.
Any help would be really appreciated.
In the meantime I have removed the language switch block on www.cims-scic.ca site and added a hard link redirecting to the respective home page of each language. Not ideal at all. So basically in order to now see the problem have a look at
http://www.annelies.ca/cims/
Thank you anyone for your help.
Comment #12
pdesarnaud commentedMaybe the problem doesn't comes from i18n module. Maybe it comes from the fact you are using a multisite configuration and there is an issue with clean urls ( http://www.annelies.ca/cims/?q=fr give you the french front page but http://www.annelies.ca/cims/fr/ doesn't )
Try to disable clean url (Site configuration >> Clean URLs ) and test again.
But this will not solve your initial problem on http://www.cims-scic.ca
Comment #13
avo webworks commentedyes that is the issue on all three sites. Thank you so much for pointing that out.
Comment #14
avo webworks commentedOk I've tested the problem and even when not set up as a multisite but just as default the issue still remains.
Basically the front page isn't recognized when clean URL's are enabled.
I noticed there are some other front page issues http://drupal.org/node/614548.
I tried that fix but didn't seem to make any difference.
Is this an i18n problem or clean URL and where should I get help with this?
thanks
Comment #15
Anonymous (not verified) commentedComment #16
avo webworks commentedThank you Dominic for your help. You inspired me to restart on the test server. (annelies.ca/cims)
I deleted the database and created a new one. Downloaded Drupal, French translation and i18n module. Installed and did the steps as you mentioned in post above. So the only difference is that the English site now doesn't have a path prefix (previously I had set that to en). And you are right no issue! All works like a charm! I will go step by step to recreate the site. I've started with the module Nice Menus and will test and clear cache with every step to see where the problem starts. Could it be that it's in setting a path prefix on the default (English) site? I'll post here again if and when then problem starts up again.
thanks again for all who helped me figure this out, it's truly appreciated.
Comment #17
Anonymous (not verified) commentedComment #18
avo webworks commentedDominic thank you for you response and I am sorry to take so long to respond. It's been a busy week.
This indeed worked for CIMS website and that site works great now. All modules installed and no more issues.
However, the second site mentioned in the post octevaw-cocvff.ca still has the same issue.
I've set up a test site for this
www.octevaw-cocvff.ca/new
I follow your instructions from post #15.
I still however get the 403 error page. As it can't seem to find the french accueil.
So just to follow:
I set up the site according to #15:
I create the english page promoted to the front called home. I translated the page into french called accueil.
I edited the settings.php added the variables and changed the base URL to http://www.octevaw-cocvff.ca/new
Any help on this would be greatly appreciated.
Comment #19
Anonymous (not verified) commentedComment #20
avo webworks commentedHello Dominic,
This is copied straigth from my settings file:
$base_url = 'http://www.octevaw-cocvff.ca/new';
$conf['i18n_variables'] = array(
// Site name, slogan, mission, etc..
'site_frontpage'
);
In site admin - site configuration - site information - I have the home page in English set to path home and in french to accueil.
See image attached. I noticed that in the English part is has a slash after new/ but in french it has no slash after fr.
When I try to enter /accueil it gives an error though.
When I turn off the clean URL feature switching works great and I don't have the 403 error at all. Site is defined in default not a multi site.
thanks for your help
Comment #21
Anonymous (not verified) commentedComment #22
jose reyero commentedCleaning old issues (> 1 year without follow up)