Thread Locked This thread is locked - replies are not allowed.


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


Permlink Replies: 7 - Pages: 1 - Last Post: 24 Aug 22, 11:01 Last Post By: Laza
rainerfrey

Posts: 7
Registered: 23-May-2006
Exception after updating JAlbum and adding photos.
Posted: 20 Aug 22, 15:44
 
Hi,
I added new folders and images to an existing album. Since the last update, JAlbum and Photoblogger have also been updated. Where could I start to look for reasons for this error? Image Metadata, filename or content? Folder names, titles and descriptions? General error independent of content?

Stack trace for jAlbum 28.1.5 using skin PhotoBlogger 3.25.1:
 
se.datadosen.util.ScriptException: <eval>:164 TypeError: Cannot read property "getVars" from undefined in content.inc at line number 5
	at se.datadosen.util.ScriptException.of(ScriptException.java:59)
	at se.datadosen.jalbum.ast.ScriptletNode.doEval(ScriptletNode.java:89)
	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:89)
	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.EnterNode.doEval(EnterNode.java:23)
	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:75)
	at se.datadosen.jalbum.AlbumBean.makeIndexPages(AlbumBean.java:3729)
	at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:1862)
	at se.datadosen.jalbum.AlbumBean.makeAlbum(AlbumBean.java:3262)
	at se.datadosen.jalbum.AlbumBean.smartMakeAlbum(AlbumBean.java:3154)
	at se.datadosen.jalbum.JAlbumFrame$7.run(JAlbumFrame.java:1170)
Caused by: javax.script.ScriptException: TypeError: Cannot read property "getVars" from undefined in <eval> at line number 164
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(Unknown Source)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Unknown Source)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine$3.eval(Unknown Source)
	at java.scripting/javax.script.CompiledScript.eval(Unknown Source)
	at se.datadosen.jalbum.ast.ScriptletNode.doEval(ScriptletNode.java:60)
	... 15 more
Caused by: <eval>:164 TypeError: Cannot read property "getVars" from undefined
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.error(Unknown Source)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(Unknown Source)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(Unknown Source)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(Unknown Source)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.Undefined.get(Unknown Source)
	at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$108$\^eval\_.:program(<eval>:164)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(Unknown Source)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(Unknown Source)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(Unknown Source)
	... 19 more
rainerfrey

Posts: 7
Registered: 23-May-2006
Re: Exception after updating JAlbum and adding photos.
Posted: 20 Aug 22, 16:03   in response to: rainerfrey in response to: rainerfrey
 
Ok, I added a new Toplevel-Folder, and within a new Subfolder, and all new images reside in that subfolder. As soon as I add a second subfolder (even empty), the error disappears. I suspect this might be related to the "linking neighboring folders" feature.

"Link neighboring folders" and "Use background images" are checked, "Skip folder levels" and "Loop folders" are unchecked.
Laza

Posts: 1,575
Registered: 6-Sep-2005
Re: Exception after updating JAlbum and adding photos.
Posted: 21 Aug 22, 09:02   in response to: rainerfrey in response to: rainerfrey
 
I think getVars should never return "undefined". Perhaps you have added a web location? That is supposed to return the variables object too, but hard to imagine which album object is triggering this behavior.
rainerfrey

Posts: 7
Registered: 23-May-2006
Re: Exception after updating JAlbum and adding photos.
Posted: 22 Aug 22, 12:48   in response to: Laza in response to: Laza
 
I don't use web locations. My album looked like this:
Album
+-Top 1
   +-Sub 1a
   +-Sub 1b
+-Top 2
   +-Sub 2a
   +-Sub 2b


I then added this and got the exception:
+-Top 3
   +-Sub 3a
      +-image1.jpg
      +-image2.jpg ...


Then I added
 
+-Top 3
   +- Sub 3b // empty, no image files or subfolders.


and the exception didn't occur, the album was build successfully. When I excluded (not deleted) Sub 3b, the exception occurred again.

This problem isn't critical to me, because I will eventually add "Sub 3b" (and more) anyway, I'll just have to wait to publish until I have the images ready.

Edited by: rainerfrey on 22 Aug 2022, 12:49
RobM

Posts: 4,066
Registered: 4-Aug-2006
Re: Exception after updating JAlbum and adding photos.
Posted: 22 Aug 22, 13:00   in response to: rainerfrey in response to: rainerfrey
Helpful
rainerfrey wrote:
This problem isn't critical to me, because I will eventually add "Sub 3b" (and more) anyway, I'll just have to wait to publish until I have the images ready.
You could hide ‘Sub 3b’ so it doesn’t appear in the navigation menus, assuming hiding doesn’t cause the bug too.
Explore view>Select folder>Contextual menu>Hide
Laza

Posts: 1,575
Registered: 6-Sep-2005
Re: Exception after updating JAlbum and adding photos.
Posted: 22 Aug 22, 17:15   in response to: rainerfrey in response to: rainerfrey
Helpful
Thanks, I will try to find the bug.
rainerfrey

Posts: 7
Registered: 23-May-2006
Re: Exception after updating JAlbum and adding photos.
Posted: 23 Aug 22, 17:42   in response to: RobM in response to: RobM
 
RobM wrote:
You could hide ‘Sub 3b’ so it doesn’t appear in the navigation menus, assuming hiding doesn’t cause the bug too.
Explore view>Select folder>Contextual menu>Hide

FWIW hiding does trigger the bug as well.
Laza

Posts: 1,575
Registered: 6-Sep-2005
Re: Exception after updating JAlbum and adding photos.
Posted: 24 Aug 22, 11:01   in response to: rainerfrey in response to: rainerfrey
 
Yes, I learned. It seems something has changed in jAlbum, not the skin. Anyway, I'll try to find some workaround.
Legend
Forum admins
Helpful Answer
Correct Answer

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