Re: [Plone-developers] Fixing LinguaPlone bug 243 - Where to put patch

Hanno Schlichting <[email protected]>
Newsgroups gmane.comp.web.zope.plone.internationalization
Message-ID <[email protected]>
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.

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.

Hanno

------------------------------------------------------------------------------
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.