On Sun, 13 Jun 2010 00:06:05 +0200, Hanno Schlichting <[email protected]>
wrote:
> On Sat, Jun 12, 2010 at 11:55 PM, <[email protected]> wrote:
>> I've thought a bit more about the patch; I've looked at another Plone
>> site which is 3.0.6 and that also has portal_languages available.
>>
>> That other site does not have LinguaPlone installed, and there is no
>> Language index or metadata, so it seems safe enough to add Language
>> as a content filter.
>
> The patch is still wrong. Almost no application code should ever need
> to specify an explicit Language filter, as the language filtering is
> done inside the catalog's search methods. Providing an explicit filter
> into the catalog query disables the automatic filter. So the real fix
> is to avoid passing in any Language filter via the request into the
> underlying catalog call.
OK. Well, I'm still fiddling around with this bug, and when
going to
plone/folder_contents?set_language=no
I still get content which has the English language, and
has en as the value for the Language metadata and index.
Why this happens I have no idea.. it seems strange.
And it happens even though the browser's preferred language
is in the order nb, no, nn, en-us, en.
Well, back to enabling the patch in getFolderContents.. when
the patch is enabled, the correct (no) content is displayed.
Hm.. Now I see that the getFolderContents script is called
with a dictionary argument where Language is set to en. The
plot thickens...
> But this still doesn't explain the result your are seeing, as the
> getFolderContents script apparently passes on request.other incl. the
> current language into the catalog query. While this is wrong and fixed
> in Plone 4, it should result in in language filter for the current
> language and thus return the correct result.
>
> I'm not sure how you are getting the effect you have described in the
> ticket, where you get results from multiple languages. This should
> only happen if you pass in an explicit Language='all' into the catalog
> query. Some maintenance script rightfully do this, but it certainly
> isn't applicable here.
Mm. Well, I'll see what python code calls this getFolderContents script.
-Morten
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Plone-i18n mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-i18n
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.