List Info

Thread: Strange and sudden template oddity




Strange and sudden template oddity
user name
2007-03-06 12:49:50
I made a rather minor update to a template this morning --
nothing  
Bricolage-related -- and when I republished the page, three 

relatively straightforward story lists stopped producing any
results.  
Here's one of the culprits:


my (film) = Bric::Biz::Asset::Business::Story->list({
     'category_uri' => '/columns/media/film/',
     'element__id' => '1',
     'Order' => 'cover_date',
     'OrderDirection' => 'DESC',
     'publish_status' => '1',
     'unexpired'      => '1',
     'Limit' => '1'});

foreach my $substory (film) {
     my $elem = $substory->get_tile;
     my $tile_teaser = $elem->get_data('teaser');
     $tile_teaser =
$m->comp('/util/makeup.mc',text=>$tile_teaser);
     my $substory_title = $substory->get_title();
     my $substory_uri = $substory->get_uri();

     $m->print('<p><b>FILM:</b><a
class="media" title="'. 
$substory_title.'"
href="'.$substory_uri.'">
'.$tile_teaser.'</a></p>');

}

The oddest part is: when I reverted the story back to it's
previous  
state, the problem persisted. The ever odder part is, that
_all_ of  
the other similar / identical story lists are working fine.

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth



Re: Strange and sudden template oddity
user name
2007-03-06 12:50:47
Guess I should have added: Any thoughts?  

Phillip.

On Mar 6, 2007, at 1:49 PM, Phillip Smith wrote:

>
> I made a rather minor update to a template this morning
-- nothing  
> Bricolage-related -- and when I republished the page,
three  
> relatively straightforward story lists stopped
producing any  
> results. Here's one of the culprits:
>
>
> my (film) = Bric::Biz::Asset::Business::Story->list({
>     'category_uri' => '/columns/media/film/',
>     'element__id' => '1',
>     'Order' => 'cover_date',
>     'OrderDirection' => 'DESC',
>     'publish_status' => '1',
>     'unexpired'      => '1',
>     'Limit' => '1'});
>
> foreach my $substory (film) {
>     my $elem = $substory->get_tile;
>     my $tile_teaser = $elem->get_data('teaser');
>     $tile_teaser =
$m->comp('/util/makeup.mc',text=>$tile_teaser);
>     my $substory_title = $substory->get_title();
>     my $substory_uri = $substory->get_uri();
>
>    
$m->print('<p><b>FILM:</b><a
class="media" title="'. 
> $substory_title.'"
href="'.$substory_uri.'">
'.$tile_teaser.'</a></ 
> p>');
>
> }
>
> The oddest part is: when I reverted the story back to
it's previous  
> state, the problem persisted. The ever odder part is,
that _all_ of  
> the other similar / identical story lists are working
fine.
>
> --
> Phillip Smith,
> Simplifier of Technology
> Community Bandwidth
>
>

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth



Re: Strange and sudden template oddity
user name
2007-03-06 13:16:41
On Mar 6, 2007, at 10:49, Phillip Smith wrote:

> my (film) = Bric::Biz::Asset::Business::Story->list({
>     'category_uri' => '/columns/media/film/',
>     'element__id' => '1',
>     'Order' => 'cover_date',
>     'OrderDirection' => 'DESC',
>     'publish_status' => '1',
>     'unexpired'      => '1',
>     'Limit' => '1'});

You realize, of course, that that will return only one
story, right?

Best,

David

Re: Strange and sudden template oddity
user name
2007-03-06 13:22:47

On Mar 6, 2007, at 2:16 PM, David E. Wheeler wrote:

> On Mar 6, 2007, at 10:49, Phillip Smith wrote:
>
>> my (film) =
Bric::Biz::Asset::Business::Story->list({
>>     'category_uri' => '/columns/media/film/',
>>     'element__id' => '1',
>>     'Order' => 'cover_date',
>>     'OrderDirection' => 'DESC',
>>     'publish_status' => '1',
>>     'unexpired'      => '1',
>>     'Limit' => '1'});
>
> You realize, of course, that that will return only one
story, right?
>

Yep: sure do. That is the intent.

I've narrowed the issue down to the /columns/media/ category
(or any  
sub-categories). Is there any obvious thing that I'm missing
that  
might explain why sudenly no stories would be returned for a
category  
(or sub-category) that has stories in it?

Phillip.

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth



Re: Strange and sudden template oddity
user name
2007-03-06 13:38:28
On Mar 6, 2007, at 11:22, Phillip Smith wrote:

> I've narrowed the issue down to the /columns/media/
category (or  
> any sub-categories). Is there any obvious thing that
I'm missing  
> that might explain why sudenly no stories would be
returned for a  
> category (or sub-category) that has stories in it?

Shouldn't it be:

   category_url => '/columns/media/%'

?

Best,

David

Re: Strange and sudden template oddity
user name
2007-03-06 13:46:52
On Mar 6, 2007, at 2:38 PM, David E. Wheeler wrote:

> On Mar 6, 2007, at 11:22, Phillip Smith wrote:
>
>> I've narrowed the issue down to the /columns/media/
category (or  
>> any sub-categories). Is there any obvious thing
that I'm missing  
>> that might explain why sudenly no stories would be
returned for a  
>> category (or sub-category) that has stories in it?
>
> Shouldn't it be:
>
>   category_url => '/columns/media/%'

Tried that: no change.

Basically, I have three sub-categories under /columns/media
-- / 
film, /music, and /books

Until today, each would happily return the most recently
published  
story. Then, suddenly, no stories.

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth



Re: Strange and sudden template oddity
user name
2007-03-06 14:07:09
On Mar 6, 2007, at 2:46 PM, Phillip Smith wrote:

>
> On Mar 6, 2007, at 2:38 PM, David E. Wheeler wrote:
>
>> On Mar 6, 2007, at 11:22, Phillip Smith wrote:
>>
>>> I've narrowed the issue down to the
/columns/media/ category (or  
>>> any sub-categories). Is there any obvious thing
that I'm missing  
>>> that might explain why sudenly no stories would
be returned for a  
>>> category (or sub-category) that has stories in
it?
>>
>> Shouldn't it be:
>>
>>   category_url => '/columns/media/%'
>
> Tried that: no change.
>
> Basically, I have three sub-categories under
/columns/media -- / 
> film, /music, and /books
>
> Until today, each would happily return the most
recently published  
> story. Then, suddenly, no stories.

Ug! Why look for conspiracy, when _stupidity_ can explain so
much...

I was getting empty results because the folks entering the
content  
stopped using the "teaser" element to put in a
description of the  
story -- and that's all I was printing out!  

Doh!

Phillip.

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth



Re: Strange and sudden template oddity
user name
2007-03-06 14:51:48
On Mar 6, 2007, at 12:07, Phillip Smith wrote:

> Ug! Why look for conspiracy, when _stupidity_ can
explain so much...
>
> I was getting empty results because the folks entering
the content  
> stopped using the "teaser" element to put in
a description of the  
> story -- and that's all I was printing out!  

I both love it and hate it when I find that the solution is
something  
like that. It depends on how much hair had to pull out
before  
figuring it out. 

Best,

David

[1-8]

about | contact  Other archives ( Real Estate discussion Medical topics )