This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 15 - Pages: 2 [ 1 2 | Next ] - Last Post: 27 Jul 26, 10:28 Last Post By: davidekholm Threads: [ Previous | Next ]
zif

Posts: 38
Registered: 8-Nov-2009
Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 15:26
 
  Click to reply to this thread Reply
Hi. After updating from jAlbum 39.3.1 to jAlbum 39.7 i get the following error message regarding my slide.htt (which caused no problems before):

Stack trace for jAlbum 39.7 using skin Tiger 8.2.0:

se.datadosen.tags.ElementException: Relative indexing in ja:fileiterator not allowed in this scope (slide.htt:332)
at se.datadosen.jalbum.ast.IteratorNode.doEval(IteratorNode.java:80)
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:68)
at se.datadosen.jalbum.AlbumBean.makeSlide(AlbumBean.java:4954)
at se.datadosen.jalbum.AlbumBean.lambda$makeAlbumForFolder$8(AlbumBean.java:2122)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)


The code line in (slide.htt:332) is:

<ja:fileiterator exclude="folder,webLocation" start="-6" count="12" nodirs>

Any ideas?

Edited by: zif on 25 Jul 2026, 15:26

zif

Posts: 38
Registered: 8-Nov-2009
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 15:37   in response to: zif in response to: zif
 
  Click to reply to this thread Reply
Note: I'm using a customized slide.htt and not the original one.
JeffTucker

Posts: 8,592
Registered: 31-Jan-2006
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 16:14   in response to: zif in response to: zif
 
  Click to reply to this thread Reply
I suppose we'll need to see your slide.htt, and have you tell us what you're trying to do, and why.

But we don't normally delve into customizations - it quickly becomes The Black Hole of Support.
zif

Posts: 38
Registered: 8-Nov-2009
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 17:09   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
I suppose we'll need to see your slide.htt, and have you tell us what you're trying to do, and why.

But we don't normally delve into customizations - it quickly becomes The Black Hole of Support.


My customizations could even become The nightmare of Support - LOL

Please find attached my slide.htt. The output from my slide.htt is primarily intended to generate a small photo gallery page featuring surrounding photos and keywords, which improves discoverability in search engines.

Thanks for your support!

Edited by: zif on 26 Jul 2026, 10:00
JeffTucker

Posts: 8,592
Registered: 31-Jan-2006
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 17:23   in response to: zif in response to: zif
 
  Click to reply to this thread Reply
zif wrote:
The output from my slide.htt is primarily intended to generate a small photo gallery page featuring surrounding photos and keywords, which improves discoverability in search engines.

How is that different from the index page that Tiger produces? Remember, modern search engines execute the Javascript on a page, so even if things are being "lazy loaded," they're still discoverable.
zif

Posts: 38
Registered: 8-Nov-2009
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 17:51   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
zif wrote:
The output from my slide.htt is primarily intended to generate a small photo gallery page featuring surrounding photos and keywords, which improves discoverability in search engines.

How is that different from the index page that Tiger produces? Remember, modern search engines execute the Javascript on a page, so even if things are being "lazy loaded," they're still discoverable.


I focus on effective results. The fact is, a gallery with over 1000 photos covering a broad range of topics is indexed much less effectively by search engines than a gallery with fewer photos covering similar topics.

But let's get back to the error message...
JeffTucker

Posts: 8,592
Registered: 31-Jan-2006
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 19:12   in response to: zif in response to: zif
 
  Click to reply to this thread Reply
Sorry, can't help you with that. Maybe someone else can.
RobM

Posts: 4,091
Registered: 4-Aug-2006
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 19:45   in response to: zif in response to: zif
 
  Click to reply to this thread Reply
Mac OS 26.5.2, jAlbum and skin as reported, with the template replacing the built-in one, Settings>Pages>Make slide pages
Album builds with no error.

Have you tried uninstalling and re-installing jAlbum?
zif

Posts: 38
Registered: 8-Nov-2009
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 20:21   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Hi Rob. Thanks for your suggestion. Re-installing jAlbum didn't help. But now i noticed, that the problem seems to occur only with one specific album. I was able to generate two other albums which have a similar structure and use the same skin and slide.htt without problems.

jAlbum 39.7 system console running Groovy (Groovy Scripting Engine)
This section captures debug prints sent to System.out and System.err
The top section evaluates expressions.
+Press Strg+E to evaluate an expression. (Evaluates selected text if selection is active)+
You have access to the basic jAlbum implicit objects such as engine and window

Sample expressions:
+4*(3+2); // Basic calculations+
engine.getSkin(); // Use of implicit object
for (AlbumObject ao : selectedObjects) println ao; // Iterate over selected objects
window.messageBox("You can interact with any Java object");
Profiler.instance // Print profiling data for last album build

Startup: 4.54s
Skin loading: 1.12s
Skin loading: 0.498s
Skin loading: 0.281s

Erzeuge "Panorama" (Änderungen)
"Panorama" erzeugt in 2.167s
Skin loading: 0.317s

Erzeuge "Fernweh" (Änderungen)
"Fernweh" erzeugt in 1m 10.514s
Skin loading: 0.816s

Erzeuge "Fotos" (Änderungen)
se.datadosen.tags.ElementException: Relative indexing in ja:fileiterator not allowed in this scope (slide.htt:332)
+ at se.datadosen.jalbum.ast.IteratorNode.doEval(IteratorNode.java:80)+
+ 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:68)+
+ at se.datadosen.jalbum.AlbumBean.makeSlide(AlbumBean.java:4954)+
+ at se.datadosen.jalbum.AlbumBean.lambda$makeAlbumForFolder$8(AlbumBean.java:2122)+
+ at java.base/java.util.concurrent.FutureTask.run(Unknown Source)+
+ at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)+
+ at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)+
+ at java.base/java.lang.Thread.run(Unknown Source)+
se.datadosen.tags.ElementException: Relative indexing in ja:fileiterator not allowed in this scope (slide.htt:332)
+ at se.datadosen.jalbum.ast.IteratorNode.doEval(IteratorNode.java:80)+
+ 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:68)+
+ at se.datadosen.jalbum.AlbumBean.makeSlide(AlbumBean.java:4954)+
+ at se.datadosen.jalbum.AlbumBean.lambda$makeAlbumForFolder$8(AlbumBean.java:2122)+
+ at java.base/java.util.concurrent.FutureTask.run(Unknown Source)+
+ at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)+
+ at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)+
+ at java.base/java.lang.Thread.run(Unknown Source)+
RobM

Posts: 4,091
Registered: 4-Aug-2006
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 21:00   in response to: zif in response to: zif
 
  Click to reply to this thread Reply
If it is a single project that fails that indicates that the problem might be with the project or its contents.

The only other thing I can suggest is to change the start values to absolute positions. Using, for example
<ja:fileiterator exclude="folder,webLocation" start="<%= "" + (imageNum - 6) %>" count="12" nodirs>

That should stop the relative indexing, I think.
zif

Posts: 38
Registered: 8-Nov-2009
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 21:04   in response to: zif in response to: zif
 
  Click to reply to this thread Reply
For testing I did also restore the project with a version before the JAlbum and skin update. The error message when "Make album" still occurs.
zif

Posts: 38
Registered: 8-Nov-2009
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 21:13   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
If it is a single project that fails that indicates that the problem might be with the project or its contents.

The only other thing I can suggest is to change the start values to absolute positions. Using, for example

<ja:fileiterator exclude="folder,webLocation" start="<%= "" + (imageNum - 6) %>" count="12" nodirs>

That should stop the relative indexing, I think.

Hi Rob. Your suggestion leads to a new error message in the same line:

Stack trace for jAlbum 39.7 using skin Tiger 8.2.0:

se.datadosen.util.ScriptException: <eval>:1 ReferenceError: "imageNum" is not defined in slide.htt at line number 332
RobM

Posts: 4,091
Registered: 4-Aug-2006
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 25 Jul 26, 21:22   in response to: zif in response to: zif
 
  Click to reply to this thread Reply
It works for me using the Sample Project with make slide pages enabled.
zif

Posts: 38
Registered: 8-Nov-2009
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 26 Jul 26, 10:00   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Hi Rob. Thanks for your support. I made some more testing. It keeps strange. Your code line works with the two other projects, but not with the current project. Now I uninstalled jAlbum 39.7 and switched back to jAlbum 39.4.1 (still with Tiger 8.2.0). With this jAlbum version everything works fine... So the problem seems to occur with some new jAlbum updates and has nothing to do with the code im my slide.htt

So, for the time being, I will forgo jAlbum updates and hope that other users encounter the same problem or that the issue resolves itself in later versions. :-)
RobM

Posts: 4,091
Registered: 4-Aug-2006
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 26 Jul 26, 10:43   in response to: zif in response to: zif
 
  Click to reply to this thread Reply
The best way to fix the problem is to identify the cause. Since it is a single project you could try the following:

Duplicate the project that fails.

In the duplicate exclude the first half of all folders. If it works add half back again. If it still fails exclude half of the remaining folders.

Repeat until you identify the folder that causes the failure.

When you have a small set of included folders/files delete the excluded folders/files and make the resulting project available either here or to jAlbum (David).
Legend
Forum admins
Helpful Answer
Correct Answer

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