[Act] news/edit bug
Detlev Hauschildt
detlev at xs4all.nl
Tue Jul 18 20:39:15 CEST 2017
Hello Tina,
Thanks for your suggestion. I pored over it a little more, but I don't
think you can really fix it in the template. Even if you take [% title
%] directly, instead of [% items.$lang.title %], the same doesn't seem
possible for [% text %], because I don't see that filled anywhere. And
also, it wouldn't work for conferences with more than one language.
Also, if I'm not totally mistaken, $fields->{title} = $news->{items}{
$Request{language} } (in Act::Handler::News::Edit) doesn't even work,
because ->items is a method and $news->{items} is only filled after
$news->items was called at least once.
And a small correction of my earlier post: the module name is
Act::Handler::News::Edit, not Act::Handler::News.
Cheers,
Detlev
On 2017-07-18 19:32, Tina Müller wrote:
> Hi,
>
> when I read the email subject I was reminded of a Pull Request
> I made some years ago:
> https://github.com/book/Act/pull/58
>
> The change I made is in the template.
> I never tried it out, but I think this fits exactly to the
> code change.
>
> cheers,
> tina
>
> On Tue, 18 Jul 2017, Detlev Hauschildt wrote:
>
>> Hello again,
>>
>> my second issue relates to the news/edit template. If the news admin
>> clicks on a news message on
>> http://act.perlconference.org/tpc-2017-amsterdam/newsadmin this will
>> open a page coming from the template news/edit, which in turn is
>> called by Act::Handler::News. The default template news/edit expects
>> the news message to be passed to the template in a hash called
>> $items, but that is currently not filled in Act::Handler::News.
>>
>> I compared the current Act::Handler::News to an earlier version and
>> the only difference is:
>>
>> 137c137
>> < $fields->{items} = $news->items;
>> ---
>>> $fields->{title} = $news->{items}{ $Request{language}
>> }{title};
>>
>>
>> So it appears that only the title is passed now, but not the hash
>> $items, so the template always generates an empty form. So, I think
>> the old line needs to come back. (The new one can stay, I suppose, in
>> case someone needs it.)
>>
>> It would be nice if you could do that!
>>
>> Detlev
>>
>>
>>
>> _______________________________________________
>> Act mailing list
>> Act at mongueurs.net
>> http://listes.mongueurs.net/mailman/listinfo/act
>>
>
More information about the Act
mailing list