using the default adaptivetheme untouched
two language (en english and el Greek)
primary links are all set to either en or el (no language neutral menus)
everything works fine with the primary links menu except on the front page for greek
/el but when I navigate to /el/home which is the same page primary links show up again

take a look at the 5 screenshots as well

this does not happen with garland so its specific to adaptivetheme

any pointers of where primary links menu gets created ?
any workaround ?

CommentFileSizeAuthor
primary-links-on-front-page.png53.23 KBGiorgosK
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GiorgosK’s picture

NOTE: en is the default language for the site

Jeff Burnz’s picture

Category: bug » support

Why is this a theme layer issue?

"this does not happen with garland" is not a bug report - because they both use the same logic, the same theme functions and neither are modified by the theme layer in any way.

GiorgosK’s picture

Sorry for the trouble it seemed like a logical conclusion since garland behaves as expected with the same exact installation and configuration

I would appreciate any pointers though
where do I start debugging ?
where does the action take place - not very familiar with inner workings of drupal

Jeff Burnz’s picture

What is at /el/home - is this a node or some other module output such as a view or panel?

Its a bit of a weird one, what else do you have enabled, such as classes for Primary links (in the theme settings).

Either I'll need to see the site or work through many details, these can be hard to trouble shoot and my time unfortunately is pretty limited at the moment.

Jeff Burnz’s picture

Oh, hang on, I notice the links are displaying vertically - is this the Primary Links Block? If so, then perhaps its just a matter of of your visibility setting? I assume you were using the normal primary links feature (which will just "work" without issues).

If you configure the block there will be a new fieldset for "Multilingual Settings" for the block + the normal block visibility settings - perhaps you have adjusted these and it is not correct for your subtheme?

GiorgosK’s picture

No this is the default primary-links that should be controlled from
admin/build/themes/settings/adaptivetheme

but they don't, the setting is actually not respected as I mentioned here #652434: primary_links setting not respected
primary links are disabled for all enabled themes but still display

take a look at the test youbookit. gr/el and
I could give you admin access to the site so you can change anything you need

or encourage you to setup your own multilingual site to test this

Jeff Burnz’s picture

Status: Active » Fixed

So, after a lot of messing about with your site I found what the problem was, but not the root cause - certainly this is nothing to do with the theme layer or Adaptivetheme.

The problem was with the nodes you had set at the front page for each language, I dont fully get why it wasnt working (no time to figure it out), but what I did was set both languages homepages back to /node AND reinstated the i18n variable's for primary and secondary links in settings.php - after I did this the primary links started working as per normal.

I then created a new node called "test-front-page" (in Greek) and then translated this node to English and gave it a distinct title of "test-front-page-en" and set both of these as the front pages for their respective language. You can see that I have done this in the Site Information settings.

Now it is working.

I believe the reason it worked for Garland is that you had not messed about with the i18n variables for Garland.

Also you should remove this <?php if ( theme_get_setting('toggle_primary_links')): ?> from around the primary links in the youbookit theme, I believe I already explained to you that its not needed and was not the actual issue affecting your site.

GiorgosK’s picture

Jeff, sorry for the trouble and thanks for looking into this

I have never set those i18n_variables any other time before, not for this site nor any other site, it was never necessary

$conf['i18n_variables'] = array(
  'menu_primary_menu',
  'menu_secondary_menu',
);

I usually only set these

 'site_name',
 'site_slogan',
 'site_mission',
 'site_footer',

is that a requirement for adaptivetheme and i18n ?

I have the feeling that the whole trouble might have to do with me changing default language from English to Greek and then back to English but never realizing it created a mess.

I was about to do a fresh install but it seems I might not need to

Jeff Burnz’s picture

No, its not a requirement for Adaptivetheme, I was just explaining what I had to do to get it work for *your site*, however munged it is.

Look, I know every line of code in this theme and if anything is going to go wrong with multilingual stuff its going to be the modules + I have built 3 multilingual sites with it and run English, Arabic and Swedish on my testing site all the time with i18n installed as well a dozen other popular modules like Views, Panels, Context and so on - it gets a lot of testing, believe me.

GiorgosK’s picture

Jeff,
the problem kept on happening even after a fresh install of drupal without me changing the theme or anything else (all default modules used - no hacking)

after a lot of hours of debugging I came to this solution which might help if anybody else runs into this problem
#614548: i18n_init() not run early enough - frontpage primary menus in wrong language or dissapearing

thanks for all your help

Jeff Burnz’s picture

Status: Fixed » Closed (fixed)

Well hope you get it sorted, buts let re-iterate to those visiting this thread, its not a theme related issue.