This question is answered. Helpful answers available: 0. Correct answers available: 1.


Permlink Replies: 6 - Pages: 1 - Last Post: 09-Jan-2019 18:27 Last Post By: UKPinup
UKPinup

Posts: 20
Registered: 24-Feb-2018
ZigZag Doing weird stuff.
Posted: 09-Jan-2019 12:58
 
  Click to reply to this thread Reply
Hello could anyone help, I use Zigzag as a front page and it has done a really good job until now.
I added a new blank page and when I try to make the album I get the following error.

An unexpected error occurred. Please see detailed description below:

java.lang.NullPointerException
at se.datadosen.jalbum.ast.IteratorNode.doEval(IteratorNode.java:95)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.ast.GroupNode.doEval(GroupNode.java:78)
at se.datadosen.jalbum.ast.IncludeNode.doEval(IncludeNode.java:92)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.ast.GroupNode.doEval(GroupNode.java:78)
at se.datadosen.jalbum.ast.IncludeNode.doEval(IncludeNode.java:92)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.ast.GroupNode.doEval(GroupNode.java:78)
at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
at se.datadosen.jalbum.AST.eval(AST.java:77)
at se.datadosen.jalbum.AlbumBean.processTemplateFile(AlbumBean.java:1271)
at se.datadosen.jalbum.AlbumBean.processTemplateFile(AlbumBean.java:1264)
at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:1480)
at se.datadosen.jalbum.AlbumBean.makeAlbum(AlbumBean.java:2777)
at se.datadosen.jalbum.AlbumBean.smartMakeAlbum(AlbumBean.java:2690)
at se.datadosen.jalbum.JAlbumFrame$6.run(JAlbumFrame.java:1092)

I've updated Java and reloaded Jalbum to no avail.

I would be grateful for any help.

Thanks in advance MIke.
jGromit

Posts: 7,535
Registered: 31-Jan-2006
Re: ZigZag Doing weird stuff.
Posted: 09-Jan-2019 13:24   in response to: UKPinup in response to: UKPinup
Helpful
  Click to reply to this thread Reply
I can at least confirm the error, so it's not something wrong with your jAlbum installation (and BTW, if you're using the regular jAlbum version that has Java bundled with it, there's no need to update your own copy of Java - in fact, you don't need to have Java installed on your machine at all).

That error message is pretty opaque - it's not clear what's throwing it for a loop. I'll keep poking around with it to see if I can narrow it down, but we'll probably need some assistance from David on this one.
jGromit

Posts: 7,535
Registered: 31-Jan-2006
Re: ZigZag Doing weird stuff.
Posted: 09-Jan-2019 13:55   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
I've managed to narrow it down. On line 17 of common-header.inc, it doesn't like this iterator tag:
<ja:iterator category="webPage,folder"><a href="${closeupPath}">${title}</a></ja:iterator>
It's not the content of the iterator that kills it - it's the mere presence of the iterator (i.e., it can be empty, with just an opening and closing iterator tag). I believe the problem is that, at this stage of the processing, there is no "current folder" through which it can iterate.

ETA: And you can't just edit out the offending script tag, because this file is also included in the processing of the regular pages, like index.htt, where that iterator is needed. I'll send up a flare to David....
UKPinup

Posts: 20
Registered: 24-Feb-2018
Re: ZigZag Doing weird stuff.
Posted: 09-Jan-2019 14:08   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Thank you, I'm OK with basic HTML but what you just wrote has gone over my head I'm afraid.
jGromit

Posts: 7,535
Registered: 31-Jan-2006
Re: ZigZag Doing weird stuff.
Posted: 09-Jan-2019 14:10   in response to: UKPinup in response to: UKPinup
 
  Click to reply to this thread Reply
It was intended more as a flag for David, like a big red arrow pointing to the gaping hole in the road. ;)
davidekholm

Posts: 3,610
Registered: 18-Oct-2002
Re: ZigZag Doing weird stuff.
Posted: 09-Jan-2019 17:42   in response to: jGromit in response to: jGromit
Helpful
  Click to reply to this thread Reply
Thanks for reporting! Here's a fix: Replace your lib/jalbum-core.jar with this file (v17.2b1). As an alternative fix, you can edit that <ja:iterator> tag so you add a start="0" attribute to it, like this:
<ja:iterator category="webPage,folder" start="0">
. It should actually have such an attribute, otherwise jAlbum defaults to "paging", which is only relevant for index pages.

(This is the iterator tag responsible for adding the menus at the top, and there should be the same menus no matter what index page is being presented, so start="0" should really be added. With this update jAlbum senses if this iterator called via an index page and then implicitly adds a start="0")
UKPinup

Posts: 20
Registered: 24-Feb-2018
Re: ZigZag Doing weird stuff.
Posted: 09-Jan-2019 18:27   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Thank you that seems to have fixed the problem.

Cheers Mike.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums