You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Alison Heimoz <ah...@day.com> on 2010/06/01 14:06:49 UTC

Re: ESPBlog Sample - reference error

Hi Bertrand,

That works now - many thanks.

On a slight tangent.....while playing around with this myself I tripped over
the fact that for espblog:
- the esp scripts are stored under initial-content/apps/
- but the pom isn't configured for the initial-content (ie the scripts) to
  be updated when the bundle is rebuilt/reinstalled
So any changes I made to various (existing) scripts didn't have an impact
(new ones did, which helped blur the issue). Took me a little while to track
down that my changes were not being deployed - instead of simply not
working.

Carsten has helped me configure the <Sling-Initial-Content> section, but I
don't know whether it would be worth updating that in the espblog sample on
the basis that beginners tend to take a sample and start to make their own
changes. Or at least add a note to the readme.txt, it's proved a good
learning experience for me :-)

Cheers Alison



On Mon, May 31, 2010 at 3:35 PM, Bertrand Delacretaz <bdelacretaz@apache.org
> wrote:

> Hi Alison,
>
> On Thu, May 27, 2010 at 1:17 PM, Alison Heimoz <ah...@day.com> wrote:
> > ...I've built, installed, activated both path-based-rtp and espblog and
> the
> > prerequisites in readme.txt all seem OK, but I get
> >    ReferenceError: "currentNode" is not defined.
> (/apps/espblog/html.esp#*
> > <xx*>) (500)
> > on a lot of the links - even when trying to create a new post (
> > http://localhost:8080/content/espblog/posts/*.edit.html).
> >
> > So I'm hazarding a guess that some initial content is missing...(?)...
>
> The problem is that the currentNode variable is now provided only if
> the current request points to an actual node, and that's not the case
> with that *.edit.html request.
>
> The sample hadn't been updated for this change, I have done so now,
> see SLING-1540.
>
> I have tested creating, editing and commenting posts, please cross-check.
>
> Thanks for your feedback,
> -Bertrand
>