Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#5 | i18n_cached_frontpage.patch | 2.04 KB | Jose Reyero |
#4 | localized_front_page.zip | 1.17 KB | plach |
#3 | localized_front_page.zip | 1.35 KB | plach |
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedYes, it looks like it may be the cause. So we need some workaround for this.
Comment #2
Jose Reyero CreditAttribution: Jose Reyero commentedTaking 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.
Comment #3
plachI am using the attached module on some sites and it seems to work. Would a similar approach work?
Comment #4
plachSorry, the attachment in #3 was an old version. This one is correct.
Comment #5
Jose Reyero CreditAttribution: Jose Reyero commented@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.
Comment #6
tjhellmannI applied the patch and seems to have corrected the issue. Thank you. Haven't noticed any other side effects.
Comment #7
Jose Reyero CreditAttribution: Jose Reyero commentedWe 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.
Comment #8
havran CreditAttribution: havran commentedThis solution (use patched dev version) help me with menu problem (missing first and last menu items on frontpage main menu). Thanks!
Comment #9
Jose Reyero CreditAttribution: Jose Reyero commentedOk, so this seems to fix this issue and some more, cool :-)
Btw, we'll be doing a new maintenance release this week.
Comment #10
stewart.adam CreditAttribution: stewart.adam commentedThis patch is causing the problems described in #826774. I've posted more details there.
Comment #11
colanThat's http://drupal.org/node/826774 for those that would like to get there faster. ;)