[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mtos-dev
Subject:    [MTOS-dev] Weird blog_id vs blog_ids conflict (and possible bug)
From:       François_Nonnenmacher <lists () padawan ! info>
Date:       2009-09-12 4:52:42
Message-ID: 4BD86FD7-30FB-4EDB-98CD-CE1E9EFE7DF2 () padawan ! info
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


The following code used to work when dynamically generated on MT4.25:

<mt:setvarblock name="blogid"><$mt:BlogID$></mt:setvarblock>
<mt:blogs blog_ids="$blogid">
<mt:If tag="BlogCommentCount">
     <mt:Comments lastn="10" sort_order="descend">
         <mt:CommentsHeader>
<div class="widget-recent-comments widget">
     <h3 class="widget-header">Commentaires récents</h3>
     <div class="widget-content">
         <ul>
         </mt:CommentsHeader>
             <li><strong><$mt:CommentAuthor$></strong> : < 
$mt:CommentBody remove_html="1" words="10"$> <a href="<$mt:CommentLink 
$>" title="commentaire complet sur : <mt:CommentEntry><$mt:EntryTitle 
$></mt:CommentEntry>">lire la suite</a></li>
         <mt:CommentsFooter>
         </ul>
     </div>
</div>
         </mt:CommentsFooter>
     </mt:Comments>
</mt:If>
</mt:blogs>

But with MT4.31 and through a dynamic search with a URL such as mt- 
search.cgi?blog_id=66&tag=chrome&limit=20 (tags in this case), it  
throws an error about "include_blogs, exclude_blogs, blog_ids and  
blog_id attributes cannot be used together". The only difference  
between the static and dynamic rendering is the "blog_id" parameter in  
the URL.

So far I've resorted to not render the code when it's dynamically  
generated with the trick below:
<mt:unless name="system_template">
[...]
</mt:unless>

But I would like it to work when dynamically generated and when the  
blog_id parameter is in the URL. (I haven't found a proper workaround  
yet, but anyway...)

I find that this conflict between a parameter in the URL and one in  
the template code as well as the resulting behavior is a bug. IMO, if  
the URL parameter blog_id sets a blog context here, the above code  
should work anyway, shouldn't it?

François Nonnenmacher
-- 
Ubiquitic
http://ubiquitic.com/
info@ubiquitic.com


[Attachment #5 (text/html)]

<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; ">The following code used to work when \
dynamically generated on MT4.25:<div><br></div><div><span class="Apple-style-span" \
style="font-family: Monaco, 'Andale Mono', 'Courier New', Courier, monospace; \
font-size: 12px; white-space: pre-wrap; ">&lt;mt:setvarblock \
name="blogid"&gt;&lt;$mt:BlogID$&gt;&lt;/mt:setvarblock&gt; &lt;mt:blogs \
blog_ids="$blogid"&gt; &lt;mt:If tag="BlogCommentCount"&gt;
    &lt;mt:Comments lastn="10" sort_order="descend"&gt;
        &lt;mt:CommentsHeader&gt;
&lt;div class="widget-recent-comments widget"&gt;
    &lt;h3 class="widget-header"&gt;Commentaires récents&lt;/h3&gt;
    &lt;div class="widget-content"&gt;
        &lt;ul&gt;
        &lt;/mt:CommentsHeader&gt;
            &lt;li&gt;&lt;strong&gt;&lt;$mt:CommentAuthor$&gt;&lt;/strong&gt; : \
&lt;$mt:CommentBody remove_html="1" words="10"$&gt; &lt;a \
href="&lt;$mt:CommentLink$&gt;" title="commentaire complet sur : \
&lt;mt:CommentEntry&gt;&lt;$mt:EntryTitle$&gt;&lt;/mt:CommentEntry&gt;"&gt;lire la \
suite&lt;/a&gt;&lt;/li&gt;  &lt;mt:CommentsFooter&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;/div&gt;
        &lt;/mt:CommentsFooter&gt;
    &lt;/mt:Comments&gt;
&lt;/mt:If&gt;
&lt;/mt:blogs&gt;
</span></div><div><font class="Apple-style-span" face="Monaco, 'Andale Mono', \
'Courier New', Courier, monospace"><span class="Apple-style-span" style="white-space: \
pre-wrap;"><br></span></font></div><div>But with MT4.31 and through a dynamic search \
with a URL such as mt-search.cgi?blog_id=66&amp;tag=chrome&amp;limit=20&nbsp;(tags in \
this case), it throws an error about "<span class="Apple-style-span" \
style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; \
">include_blogs, exclude_blogs, blog_ids and blog_id attributes cannot be used \
together<span class="Apple-style-span" style="font-family: Helvetica; font-size: \
medium; ">". The only difference between the static and dynamic rendering is the \
"blog_id" parameter in the URL.</span></span></div><div><br></div><div>So far I've \
resorted to not render the code when it's dynamically generated with the trick \
below:</div><div><span class="Apple-style-span" style="font-family: Monaco, 'Andale \
Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: pre-wrap; \
">&lt;mt:unless name="system_template"&gt; </span></div><div><font \
class="Apple-style-span" face="Monaco, 'Andale Mono', 'Courier New', Courier, \
monospace"><span class="Apple-style-span" style="white-space: \
pre-wrap;">[...]</span></font></div><div><div><span class="Apple-style-span" \
style="font-family: Monaco, 'Andale Mono', 'Courier New', Courier, monospace; \
font-size: 12px; white-space: pre-wrap; ">&lt;/mt:unless&gt;</span></div><div><font \
class="Apple-style-span" face="Monaco, 'Andale Mono', 'Courier New', Courier, \
monospace"><span class="Apple-style-span" style="white-space: \
pre-wrap;"><br></span></font></div></div><div>But I would like it to work when \
dynamically generated and when the blog_id parameter is in the URL. (I haven't found \
a proper workaround yet, but anyway...)</div><div><br></div><div>I find that this \
conflict between a parameter in the URL and one in the template code as well as the \
resulting behavior is a bug. IMO, if the URL parameter blog_id sets a blog context \
here, the above code should work anyway, shouldn't it?</div><div><br></div><div><span \
class="Apple-style-span" style="font-size: 12px; ">François \
Nonnenmacher</span></div><div apple-content-edited="true"><span \
class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); \
font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; \
font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; \
text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; \
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; \
color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: \
normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; \
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; \
color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: \
normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; \
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; \
color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: \
normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; \
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; "><div><div><div><div><div><div><div><div><div><div><div><div><div><div>--&nbsp;</div><div>Ubiquitic</div><div><div><a \
href="http://ubiquitic.com/">http://ubiquitic.com/</a></div></div><div><a \
href="mailto:info@ubiquitic.com">info@ubiquitic.com</a></div></div></div></div></div>< \
/div></div></div></div></div></div></div></div></div></div></span></div></span></div></span></div></span> \
</div><br></body></html>



_______________________________________________
MTOS-dev mailing list
MTOS-dev@sixapart.com
http://www.sixapart.com/mailman/listinfo/mtos-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic