Anil Gangolli wrote:

Thanks for catching this.

Oddly, my template running on my personal blog with 3.1RC6+mods has got the incorrect $entry references as well, but they somehow seem to be working even with rendering.legacyModels.enabled=false

Anil, I just checked my RC8 installation one more time before starting my RC9 testing and I had the same experience. I verified that I have the legacy models disabled and that the templates include the incorrect, $entry refrence yet everything is working properly.

My only explanation is that when #showWeblogEntriesPager($pager) is called earlier in the template that it is setting that $entry variable when it does "#foreach( $entry in $entries )". That's a little bit funky since you would intuitively think that $entry variable was scoped to just within that loop, but now that I think about it more I am guessing that velocity just sets that variable in the context and leaves it from that point on.

While that is not necessarily the behavior we would have hoped for or expected, I assume that is why we didn't catch this problem initially and why it is working properly for most people. The interesting question is why did the issue just crop up recently then? From the reports on the list it sounds like people were only noticing this on the trunk, which makes me wonder if this is somehow tied to the Velocity 1.5 upgrade. In particular I am wondering if Velocity 1.5 has changed its behavior such that now that $entry variable is not left around after the loop in which it is used, which is why the problem is just cropping up now.

-- Allen



--a.



----- Original Message ----- From: "Dave" <[EMAIL PROTECTED]>
To: <dev@roller.apache.org>
Sent: Friday, April 20, 2007 9:56 PM
Subject: Re: 3.1 release approved by Roller PMC (was Re: Release Apache Roller 3.1 RC8)


Yes, I agree and I'll put together a new release candidate tomorrow morn.

- Dave


On 4/20/07, Allen Gilliland <[EMAIL PROTECTED]> wrote:
lkhsflkhwelhsf!!! crap, crap ... i have to change my vote to -1, there
is a pretty bad bug in the 3.1 release and it's in the 3.0 release as
well =(

Matthew and Iruiz helped me notice this bug ...

In the Weblog.vm file for our 3.0 themes there are calls to
#showWeblogEntryComments($entry) and #showWeblogEntryCommentForm($entry)
which are not valid.  the $entry variable is not a valid Roller 3.0
model variable, it refers to a pre 3.0 model variable and therefore
breaks those macro calls if the admin hasn't set
"rendering.legacyModels.enabled=true" in their custom config.

those calls should be ...

#showWeblogEntryComments($model.weblogEntry)
#showWeblogEntryCommentForm($model.weblogEntry)

sadly, I think we need to apply this fix to this release before it goes
out and we should also apply it as a patch to the 3.0 codebase.  those
are the 2 instances of that problem which I have noticed because they
were pointed out, but we should do a scan for other places in the theme
files which may be having the same problem.

i really don't know how this wasn't identified before :/

-- Allen


Dave wrote:
> Votes to release RC8 as Apache Roller 3.1:
>
>   +1  Allen Gilliland
>   +1  Anil Gangolli
>   +1  Craig Russell
>   +1  Jeffrey Blattman
>   +1  Matt Raible
>
> That gives us four binding Roller PMC votes and thus approves the > release.
>
> Our distribution directory is is now in place, so I will move
> distribution files in place and put together a graduation / release
> announcement before the end of the weekend.
>
> Thanks to all the testers, contributors and commiters.
>
>
> - Dave



Reply via email to