On Feb 16, 11:00 pm, Brian Ramsay <[email protected]> wrote:
> I'm having a strange issue with tags_out after updating to 0.7-dp3
> (from .6.something).
>
> I am outputting a list of tags using tags_out.
>     <?php if ( $post->tags ) { ?>
>         <td><div class="tags"><?=_e('Tagged:')?> <?=$post->tags_out; 
> ?></div></td>
>
>     <?php } ?>
>
> I have also copied a line into action_init_theme() from another theme
> to list the tags in order to get the list of links:
> Format::apply( 'tag_and_list', 'post_tags_out' );
>
> Since the SVN update, something weird is going on when there are
> multiple posts displaying on the page.  The first post works fine, but
> then the second one breaks and PHP exits.  I have added some debug
> statements to try and see what's going on.
>

This behavior sounds vaguely familiar. I believe I've seen it sometime
in testing habari. The first thing I'd do is replace the first if test
with

<?php if count($post->tags) { ?>

since $post->tags will always return something, even if it is an empty
object.

The second thing is to possibly update to the testing version of
Habari, available at http://habariproject.org/dist/habari_makaanga.zip.
I have the feeling you have PHP 5.2.12/5.2.13 or an earlier 5.3.x
version of it, versions which have bugs we've been finding workarounds
for. It was in testing a ticket related to one of these I believe I
saw the same behavior.It was fixed since 0.7dp3 was released. The
ticket in question is http://trac.habariproject.org/habari/ticket/1338
.

Besides, we'd like people to start testing makaanga so we can get
Habari 0.7 released. :)

Rick

> The first time around, the first parameter sent to tag_and_list is a
> Terms object, and everything works fine.  In the next post, the first
> parameter to tag_and_list is a string containing the tag link.  Each
> subsequent post calls tag_and_list an increasing number of times and
> each time a string is passed as the first parameter.
>
> I can't figure out why it would do this - there is obviously something
> going on in the background that I'm not aware of, and I don't know how
> to track it down further.
>
> FYI, if I put
>     if ( is_string($terms) ) {
>         return $terms;
>     }
> at the top of tag_and_list() it works fine, but that is just ignoring
> the weird behavior.
>
> Thanks,
> Brian

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/habari-users

Reply via email to