Use case: I enabled the locale module and added 2 new languages. I created a view which thanks to the i18n module knows that when the locale is en, only english articles are served, same thing for the french locale. Now boost caches this /en/myview as myview.html the first time I hit this page. When I change the language, a new path is made with a new symlink pointing to the same html file (which is first overwritten), when someone new now goes to /en/myview he will see a french list (and all other language differences on that page).

So locale and i18n support would be great!

Comments

moshe weitzman’s picture

Version: 5.x-1.0 » 5.x-1.x-dev
Status: Active » Postponed

i thik supporting this has to be a drupal6 only feature since urls not standardized before then.

mlncn’s picture

Category: task » support
Priority: Normal » Critical
Status: Postponed » Active

There's got to be a way! I understand i18n is not in core until D6, and other modules (Localization) may do things differently, but I would greatly appreciate if people with some experience with Boost and/or URL rewriting could indulge the 'critical support request' rating, and take a look at how Boost might work with locales, as this is pretty important to WSF2008.net staying up in a few days.

As described by the swentel in the original post, Boost insists on treating all 'path' as a single path, and create symlinks from 'en/path.html', 'es/path.html' etc. to the path.html it created first (in whichever language the page was first viewed).

I changed the weight of i18n.module and locale.module to come before boost.module, hoping this would let paths be internationalized before boost saw them, but it didn't help.

0 stedile:/var/www/d53/cache# ls -la wsf2008.net/0/eng/place/373.html 
lrwxrwxrwx 1 www-data www-data 20 2008-01-22 08:28 wsf2008.net/0/eng/place/373.html -> ../../place/373.html
0 stedile:/var/www/d53/cache# ls -la wsf2008.net/0/nl/place/373.html 
lrwxrwxrwx 1 www-data www-data 20 2008-01-22 08:29 wsf2008.net/0/nl/place/373.html -> ../../place/373.html

It seems that worst case it should be possible to replicate internationalization logic in boost, but I'm not even sure where to start with that.

It seems the best approach though is to convince boost the paths are not identical and stop it from writing that symlink.

Thanks very much,

benjamin, Agaric Design Collective

moshe weitzman’s picture

please try barry's patch at http://drupal.org/node/174380 which stops symlink creation.

mlncn’s picture

Had just found that, thanks!

Applied and in use, it appears symlinks are still being created? Or is that a different kind of link, home.html -> ../index.html ... but it's still not wanted!

0 stedile:/var/www/d53/cache/wsf2008.net# ls -la 0/fr
total 16
drwxrwxr-x  4 www-data www-data 4096 2008-01-22 10:32 .
drwxrwxr-x 21 www-data www-data 4096 2008-01-22 10:32 ..
lrwxrwxrwx  1 www-data www-data   13 2008-01-22 10:32 home.html -> ../index.html
drwxrwxr-x  2 www-data www-data 4096 2008-01-22 10:32 node
drwxrwxr-x  2 www-data www-data 4096 2008-01-22 10:31 place
mlncn’s picture

I take that back, svn is ignoring me somehow...

mlncn’s picture

Status: Active » Fixed

Thanks Moshe, and thanks Barry Jaspin for that patch!

It works great! The whole world is happier. (I had applied an empty patch because I'm not used to curl because I just had to replace my laptop and haven't installed wget yet.)

curl -C - -O http://drupal.org/files/issues/boost-no-symlinks-174380-13.patch
patch < boost-no-symlinks-174380-13.patch 

And no more symlinks short-circuiting the caching and display of the proper language.

benjamin, Agaric Design Collective

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

Arto’s picture

Title: Support locale and multilang sites » Support locale and multilanguage sites
Assigned: Unassigned » Arto

I'll see about including this in 6.x-1.x-dev in some form, perhaps through an option to disable symlinking.

rsvelko’s picture

Title: Support locale and multilanguage sites » Support locale and multilanguage sites - 5.x

title change cause creating the same for 6.x - #428976: Support locale and multilanguage sites - 6.x