<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.6(BH)" -->
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>Developer forum</title>
        <description></description>
        <link>http://www.midgard-project.org/discussion/developer-forum/</link>
        <lastBuildDate>Sat, 17 May 2008 21:42:28 +0000</lastBuildDate>
        <generator>FeedCreator 1.7.6(BH)</generator>
        <item>
            <title>Re: [midgard-dev] SQL query for Multilang classes.</title>
            <link>http://www.midgard-project.org/discussion/developer-forum/read/810c10c2242e11ddbeb4073dcef8f5c9f5c9.html</link>
            <description>&lt;p&gt;Eero af Heurlin writes:&lt;/p&gt;

&lt;p&gt;Hi all!&lt;/p&gt;

&lt;blockquote&gt;
  &lt;blockquote&gt;
    &lt;p&gt;How many cases there are, where ordering with language fallback is
    feature key?&lt;/p&gt;
  &lt;/blockquote&gt;
  
  &lt;p&gt;I'm not sure if there are any real use cases for ordering by the
  language, some people have tried add_order('lang') in order to work
  around the limit issue (http://trac.midgard-project.org/ticket/129), but
  the &quot;fix&quot; in fact isn't, it causes other seemingly random ordering
  issues (which are &lt;em&gt;nasty&lt;/em&gt; to debug).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's page with tarball's link:
http://www.midgard-project.org/development/download/1-8-branch.html&lt;/p&gt;

&lt;p&gt;I have been trying &lt;em&gt;many&lt;/em&gt; different SQL queries to resolve multilang
issue, and all the time
I missed some small detail for perfect solution.
Many thanks for Niels &lt;a href=&quot;http://www.ohloh.net/accounts/11058&quot;&gt;http://www.ohloh.net/accounts/11058&lt;/a&gt; !
He provided very clever aggregate solution.&lt;/p&gt;

&lt;p&gt;Tarball contains new multilang query generated for multilingual objects
with preffered and fallback language.
Strict mode doesn't use and fetch data with raw selects.&lt;/p&gt;

&lt;p&gt;If you have problems with multilang objects and LIMIT and you do not
have to have released version, please check this one. We can loose
performance with new query but I think it should be still faster than
computing all
results programatically.  And of course it will provide stability for
database results.
New query should be usable also with collector.&lt;/p&gt;

&lt;p&gt;Piotras

&lt;hr /&gt;

dev mailing list
dev@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/dev&lt;/p&gt;
</description>
            <author>Piotr Pokora</author>
            <pubDate>Sat, 17 May 2008 16:26:20 +0000</pubDate>
        </item>
        <item>
            <title>Re: [midgard-dev] SQL query for Multilang classes.</title>
            <link>http://www.midgard-project.org/discussion/developer-forum/read/12f2ee78218411dd95c1fbd03becd76cd76c.html</link>
            <description>&lt;p&gt;Piotr Pokora wrote:
&lt;blockquote&gt;
  &lt;p&gt;Eero af Heurlin writes:
  &lt;blockquote&gt;
    &lt;p&gt;Of course for Midgard 2 it could be handy to specify some global ML strict setting but that will inevitable lead to issues like http://trac.midgard-project.org/ticket/237 and similar setting value juggling.&lt;/p&gt;
  &lt;/blockquote&gt;&lt;/p&gt;
  
  &lt;p&gt;QB and collector strict mode is desired mode.
  Midgard core ( 1.8.x, 1-9 branch, trunk ) uses two kind of languages.
  Default one and &quot;settable&quot; one, if both are set to the same language,
  then you have kind of global strict mode.&lt;/p&gt;
&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Point, didn't think it like that (setting fallback language and
preferred language to same)...&lt;/p&gt;

&lt;p&gt;&gt;
&lt;blockquote&gt;
  &lt;p&gt;But the real problem with SQL and ML issue I mentioned are real use
  cases for ML.
  How many cases there are, where ordering with language fallback is
  feature key?&lt;/p&gt;
&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;I'm not sure if there are any real use cases for ordering by the
language, some people have tried add_order('lang') in order to work
around the limit issue (http://trac.midgard-project.org/ticket/129), but
the &quot;fix&quot; in fact isn't, it causes other seemingly random ordering
issues (which are &lt;em&gt;nasty&lt;/em&gt; to debug).&lt;/p&gt;

&lt;p&gt;Then a log of my discussion with piotras:&lt;/p&gt;

&lt;p&gt;---&lt;snip&gt;---&lt;/p&gt;

&lt;p&gt;9:31Wednesday, May 14, 2008
Piotr Pokora
9:31
hi, just replied to your mail&lt;/p&gt;

&lt;p&gt;Eero af Heurlin
9:31
which one, the ML strict ?
Piotr Pokora
9:32
yep
I think we need to sacrifice something wrt multilang&lt;/p&gt;

&lt;p&gt;Eero af Heurlin
9:35
probably, it's a difficult thing
Piotr Pokora
9:35
nope it's not difficult :)
it's f** difficult :)
I think we could resolve it somehow using kind of &quot;foreach&quot; subqueries
but it's not acceptable for performance reason
even if those could be done internally by provider&lt;/p&gt;

&lt;p&gt;Eero af Heurlin
9:39
I wonder if Tero has any good ideas
Piotr Pokora
9:40
either this is really difficult issue or solution is so simply that we
can not see it :)&lt;/p&gt;

&lt;p&gt;Eero af Heurlin
9:40
yep
I guess if we decide that unless one adds an order to QB the order of
results will be undefined (because the ML order by lang messes them up)
though even then we have wierd order when we have equal weight before
the lang order
Piotr Pokora
9:43
yes, but I need to order them by lang to exclude one if both exists
the other solution is to order returned list , but it will work in
object properties scope only
so no orders by topic.creator for example&lt;/p&gt;

&lt;p&gt;Eero af Heurlin
9:44
it is problematic...
Piotr Pokora
9:45
or , maybe we could add spepcial QB method to make kind of &quot;post order&quot;
but API won't be clean and intuitive I suppose&lt;/p&gt;

&lt;p&gt;Eero af Heurlin
9:46
I wonder if we should make this in 1.8 afterall
it seems we'll have to rethink some parts of ML
Can I post this discussion ?
9:51 &lt;em&gt;is too lazy to write it into coherent format&lt;/em&gt;
Piotr Pokora
9:57
sure&lt;/p&gt;

&lt;p&gt;---&lt;/snip&gt;---&lt;/p&gt;

&lt;p&gt;/Rambo&lt;/p&gt;


&lt;hr /&gt;

dev mailing list
dev@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/dev
</description>
            <author>Eero af Heurlin</author>
            <pubDate>Wed, 14 May 2008 06:59:48 +0000</pubDate>
        </item>
        <item>
            <title>Re: [midgard-dev] SQL query for Multilang classes.</title>
            <link>http://www.midgard-project.org/discussion/developer-forum/read/e20b0394217f11dd8541a3cc397c6d356d35.html</link>
            <description>&lt;p&gt;Eero af Heurlin writes:
&lt;blockquote&gt;
  &lt;p&gt;MidCOM 'multilang_strict' &quot;only&quot; sets qb/collector lang transparently and when loading ML DBA objects checks their lang against the current language and returns failure if mismatched.
  Core works as usual, returning fallback language if requested language is not available (unless qb lang is set).&lt;/p&gt;
  
  &lt;p&gt;Of course for Midgard 2 it could be handy to specify some global ML strict setting but that will inevitable lead to issues like http://trac.midgard-project.org/ticket/237 and similar setting value juggling.&lt;/p&gt;
&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;QB and collector strict mode is desired mode.
Midgard core ( 1.8.x, 1-9 branch, trunk ) uses two kind of languages.
Default one and &quot;settable&quot; one, if both are set to the same language,
then you have kind of global strict mode.&lt;/p&gt;

&lt;p&gt;But the real problem with SQL and ML issue I mentioned are real use
cases for ML.
How many cases there are, where ordering with language fallback is
feature key?&lt;/p&gt;

&lt;p&gt;Piotras

&lt;hr /&gt;

dev mailing list
dev@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/dev&lt;/p&gt;
</description>
            <author>Piotr Pokora</author>
            <pubDate>Wed, 14 May 2008 06:30:54 +0000</pubDate>
        </item>
        <item>
            <title>Re: [midgard-dev] SQL query for Multilang classes.</title>
            <link>http://www.midgard-project.org/discussion/developer-forum/read/aa3dab26217d11ddad63c986db3e612f612f.html</link>
            <description>&lt;p&gt;MidCOM 'multilang_strict' &quot;only&quot; sets qb/collector lang transparently and when loading ML DBA objects checks their lang against the current language and returns failure if mismatched.&lt;/p&gt;

&lt;p&gt;Core works as usual, returning fallback language if requested language is not available (unless qb lang is set).&lt;/p&gt;

&lt;p&gt;Of course for Midgard 2 it could be handy to specify some global ML strict setting but that will inevitable lead to issues like http://trac.midgard-project.org/ticket/237 and similar setting value juggling.&lt;/p&gt;

&lt;p&gt;/Rambo&lt;/p&gt;
</description>
            <author>Eero af Heurlin</author>
            <pubDate>Wed, 14 May 2008 06:19:10 +0000</pubDate>
        </item>
        <item>
            <title>Re: [midgard-dev] SQL query for Multilang classes.</title>
            <link>http://www.midgard-project.org/discussion/developer-forum/read/d0c939fa202d11dd98b3addc52fdd46bd46b.html</link>
            <description>&lt;p&gt;Arttu Manninen writes:
&lt;blockquote&gt;
  &lt;blockquote&gt;
    &lt;p&gt;SELECT sid, title, lang FROM (SELECT sid, title, lang, CASE WHEN lang=44
    THEN 1 ELSE 0 END AS lang_set FROM article,article_i  WHERE
    article_i.sid = article.id AND lang IN (44,125) ORDER BY lang_set DESC)
    AS t GROUP BY sid;&lt;/p&gt;
  &lt;/blockquote&gt;
  
  &lt;p&gt;Very good. This has been long waited for, since I remember bumping up
  into the problem already with Midgard 1.8.2.&lt;/p&gt;
&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Found first issue. Ordering seems to be a bit wrong depending on what
you expect.
Part of SQL is : &quot;ORDER BY midgard_fallback_language DESC ,
article_i.title ASC&quot;
so in my case, result is ( in form title(lang) ):&lt;/p&gt;

&lt;p&gt;1: PL(125)
2: Sample site started(0)
3: Aegir Sample Site(0)&lt;/p&gt;

&lt;p&gt;Which obviously should be :&lt;/p&gt;

&lt;p&gt;1: Sample site started(0)
2: PL(125)
3: Aegir Sample Site(0)&lt;/p&gt;

&lt;p&gt;Comments?&lt;/p&gt;

&lt;p&gt;Piotras&lt;/p&gt;


&lt;hr /&gt;

dev mailing list
dev@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/dev
</description>
            <author>Piotr Pokora</author>
            <pubDate>Mon, 12 May 2008 14:12:37 +0000</pubDate>
        </item>
        <item>
            <title>Re: [midgard-dev] SQL query for Multilang classes.</title>
            <link>http://www.midgard-project.org/discussion/developer-forum/read/b21d8eee1f8211dda0119bacdfe62eed2eed.html</link>
            <description>&lt;p&gt;Arttu Manninen writes:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;blockquote&gt;
    &lt;p&gt;Ah! Very important. How should we treat user's LIMIT or OFFSET?
    Should we take into account all languages records or final results only?
    The latter seems to be very OK for me.&lt;/p&gt;
  &lt;/blockquote&gt;
  
  &lt;p&gt;The best option would be to have it configurable. Especially with
  &lt;code&gt;multilang_strict&lt;/code&gt; I think it should take &lt;em&gt;only&lt;/em&gt; the translated and to
  do it automatically. Of the results in general I think that latter would
  do fine.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In such case QB can transparently run typical, non ML query.
I'll take it into account :)&lt;/p&gt;

&lt;p&gt;Poitras

&lt;hr /&gt;

dev mailing list
dev@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/dev&lt;/p&gt;
</description>
            <author>Piotr Pokora</author>
            <pubDate>Sun, 11 May 2008 17:49:06 +0000</pubDate>
        </item>
        <item>
            <title>Re: [midgard-dev] SQL query for Multilang classes.</title>
            <link>http://www.midgard-project.org/discussion/developer-forum/read/9fe577a61f7211ddac0971e8ef00162f162f.html</link>
            <description>&lt;p&gt;Piotr Pokora wrote:
&lt;blockquote&gt;
  &lt;p&gt;Hi!&lt;/p&gt;
  
  &lt;p&gt;Last time when I checked similiar query I did it with MySQL 4.1, and now
  things looks very good.&lt;/p&gt;
  
  &lt;p&gt;Here's query :&lt;/p&gt;
  
  &lt;p&gt;SELECT sid, title, lang FROM (SELECT sid, title, lang, CASE WHEN lang=44
  THEN 1 ELSE 0 END AS lang_set FROM article,article_i  WHERE
  article_i.sid = article.id AND lang IN (44,125) ORDER BY lang_set DESC)
  AS t GROUP BY sid;&lt;/p&gt;
&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Very good. This has been long waited for, since I remember bumping up 
into the problem already with Midgard 1.8.2.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Ah! Very important. How should we treat user's LIMIT or OFFSET?
  Should we take into account all languages records or final results only?
  The latter seems to be very OK for me.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The best option would be to have it configurable. Especially with 
&lt;code&gt;multilang_strict&lt;/code&gt; I think it should take &lt;em&gt;only&lt;/em&gt; the translated and to 
do it automatically. Of the results in general I think that latter would 
do fine.&lt;/p&gt;

&lt;p&gt;-- 
Arttu&lt;/p&gt;


&lt;hr /&gt;

dev mailing list
dev@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/dev
</description>
            <author>Arttu Manninen</author>
            <pubDate>Sun, 11 May 2008 15:53:36 +0000</pubDate>
        </item>
        <item>
            <title>SQL query for Multilang classes.</title>
            <link>http://www.midgard-project.org/discussion/developer-forum/read/cbbaace61f5111ddb5799b9215b19bcf9bcf.html</link>
            <description>&lt;p&gt;Hi!&lt;/p&gt;

&lt;p&gt;Last time when I checked similiar query I did it with MySQL 4.1, and now
things looks very good.&lt;/p&gt;

&lt;p&gt;Here's query :&lt;/p&gt;

&lt;p&gt;SELECT sid, title, lang FROM (SELECT sid, title, lang, CASE WHEN lang=44
THEN 1 ELSE 0 END AS lang_set FROM article,article_i  WHERE
article_i.sid = article.id AND lang IN (44,125) ORDER BY lang_set DESC)
AS t GROUP BY sid;&lt;/p&gt;

&lt;p&gt;It works with MySQL and PostgreSQL, so we can implement and start using
quickly.
Most important i sfact that we should fix all annoying LIMIT issues and
select as much records as we really need.
With default language fallback of course!&lt;/p&gt;

&lt;p&gt;I would like to rewrite this part of QB this week and make 1.8.8 release
with this fix.
Please, let me know if you found some hidden crap in the query.&lt;/p&gt;

&lt;p&gt;Ah! Very important. How should we treat user's LIMIT or OFFSET?
Should we take into account all languages records or final results only?
The latter seems to be very OK for me.&lt;/p&gt;

&lt;p&gt;Basically, this:&lt;/p&gt;

&lt;p&gt;SELECT sid, title, lang FROM (SELECT sid, title, lang, CASE WHEN lang=44
THEN 1 ELSE 0 END AS lang_set FROM article,article_i  WHERE
article_i.sid = article.id AND lang IN (44,125) ORDER BY lang_set DESC
LIMIT 2) AS t GROUP BY sid;&lt;/p&gt;

&lt;p&gt;VS&lt;/p&gt;

&lt;p&gt;SELECT sid, title, lang FROM (SELECT sid, title, lang, CASE WHEN lang=44
THEN 1 ELSE 0 END AS lang_set FROM article,article_i  WHERE
article_i.sid = article.id AND lang IN (44,125) ORDER BY lang_set DESC)
AS t GROUP BY sid LIMIT 2;&lt;/p&gt;

&lt;p&gt;Piotras

&lt;hr /&gt;

dev mailing list
dev@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/dev&lt;/p&gt;
</description>
            <author>Piotr Pokora</author>
            <pubDate>Sun, 11 May 2008 11:56:47 +0000</pubDate>
        </item>
        <item>
            <title>Re: [midgard-dev] Midgard 1.9 back to focus</title>
            <link>http://www.midgard-project.org/discussion/developer-forum/read/dc3a12f01c8111ddbf453bb0e9442a1c2a1c.html</link>
            <description>&lt;blockquote&gt;
  &lt;p&gt;We need:
  * pear channel dedicated for 1.9/2.0
  * new release of midgard element role pear package&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Both done, so anyone can start testing at any time.&lt;/p&gt;

&lt;p&gt;Piotras&lt;/p&gt;
</description>
            <author>Piotr Pokora</author>
            <pubDate>Wed, 07 May 2008 22:06:36 +0000</pubDate>
        </item>
        <item>
            <title>pear19.midgard-project.org</title>
            <link>http://www.midgard-project.org/discussion/developer-forum/read/63bb7a6c1c6d11ddab03e51a58f4b12ab12a.html</link>
            <description>&lt;p&gt;Hi!&lt;/p&gt;

&lt;p&gt;Pear server is up and running. Re creating all packages is a bit pain,
but I am sure we will avoid it with setting new channel for midcom3. All
developers who would like to upload alpha or beta packages for midcom
2.9, please upload it to new channel.
Unfortunatelly pear solution doesn't use any references among database
records so everything is hardcoded per record.
So, just ping me if you need account with the same login and password on
new channel.&lt;/p&gt;

&lt;p&gt;I uploaded ~40 packages and would like to ask you to pay special
attention if any of you is a lead maintainer.
I just might mixed up category or license.&lt;/p&gt;

&lt;p&gt;Still, I have problems with these packages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Javascript_Prototoolkit&lt;/li&gt;
&lt;li&gt;midcom_admin_content&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I just can not find any package.xml for them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;template_Howto&lt;/li&gt;
&lt;li&gt;template_Simplegray&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first one exists in templates in branch-1-8 but files in package are
clearly different, so I expect it's not under svn control.
Didn't check Simplegray yet.&lt;/p&gt;

&lt;p&gt;I will create those packages as quickly as possible, without touching
any svn files. I need to have midgard 1.9 &amp;amp; midcom 2.9 installable and
ready for testing. And once again, maintainers, please fix it.&lt;/p&gt;

&lt;p&gt;Last but not least. midcom-project.org domain is not under our control.
That's why midgard-project.org domain used for channel.&lt;/p&gt;

&lt;p&gt;Piotras

&lt;hr /&gt;

dev mailing list
dev@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/dev&lt;/p&gt;
</description>
            <author>Piotr Pokora</author>
            <pubDate>Wed, 07 May 2008 19:37:34 +0000</pubDate>
        </item>
    </channel>
</rss>
