After upgrading to 6.17 last night on a bilingual site (en & es) that is using 'site_frontpage' as a multilingual variable, the path to the English home page is no longer being recognized as the front page but it is in Spanish. In my i18n_variable table, the Spanish row comes before the English row so curious if that path is getting cached and the English one not.

Not sure if this new patch http://drupal.org/node/340557 is the cause or not.

Any ideas?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jose Reyero’s picture

Priority: Normal » Critical

Yes, it looks like it may be the cause. So we need some workaround for this.

Jose Reyero’s picture

Taking a look at drupal_is_front_page(), it is called by a number of functions, http://api.drupal.org/api/function/drupal_is_front_page/6

This shouldn't run usually before i18n_init() unless some module calls any of these functions on the init hook before (Like blogapi module)

I guess we should find a way to move i18n variable and path initialization before any module init.

plach’s picture

FileSize
1.35 KB

I am using the attached module on some sites and it seems to work. Would a similar approach work?

plach’s picture

FileSize
1.17 KB

Sorry, the attachment in #3 was an old version. This one is correct.

Jose Reyero’s picture

FileSize
2.04 KB

@plach, thanks for your module, great inspiration. Btw, not sure whether your front page issues may have been fixed with this one, #614548: i18n_init() not run early enough - frontpage primary menus in wrong language or dissapearing

So I've put together this patch, done after plach's example. This just sets the variables as early as possible in the page loading, though I'm not so confident on this not breaking anything else with different cache settings.

This needs some testing yet. Please let me know whether it works for the issue here.

tjhellmann’s picture

I applied the patch and seems to have corrected the issue. Thank you. Haven't noticed any other side effects.

Jose Reyero’s picture

We need to speed up testing of this one, it's critical for next release, so I've just committed it.

Still, more testing and feedback welcomed.

havran’s picture

This solution (use patched dev version) help me with menu problem (missing first and last menu items on frontpage main menu). Thanks!

Jose Reyero’s picture

Status: Active » Fixed

Ok, so this seems to fix this issue and some more, cool :-)

Btw, we'll be doing a new maintenance release this week.

stewart.adam’s picture

This patch is causing the problems described in #826774. I've posted more details there.

colan’s picture

That's http://drupal.org/node/826774 for those that would like to get there faster. ;)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.