Rank: Member
Groups: Registered
Joined: 2/2/2017(UTC) Posts: 22 Location: Tennessee Thanks: 1 times
|
During the OnPageLoad action I am updating a node that is tied to an image on the page with a value like this:
concat("https://www.domainname.com/", $tblTableName_GetDetail/DB/RowSet/Row/@DirectoryName, "/main.jpg")
This works great, as long as the file exists. If it doesn't the picture is a replacement with a red X through it. When running this in the simulator an error is displayed. Is there any way to capture this error on the page so I can feed the node an alternate image file?
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
There is a workaround when you change your image loading from implicit, i.e. via file path (Image Source Type = url) to explicit via Load Image command and setting Image Source Type = base64.
So, OnPageLoad you execute a LoadImage to some node in your tree, and if it fails - LoadImage from another file. This in combination with Image Source Type base64 should solve your issue
|
|
|
|
Rank: Member
Groups: Registered
Joined: 2/2/2017(UTC) Posts: 22 Location: Tennessee Thanks: 1 times
|
I tried this and when I launch the simulator an error pops up and says "No page to show." There are no errors generated in the Messages window and the value is being assigned to the node. Any ideas?
By the way you have helped me a couple of times. I really appreciate it.
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
Ok, we found the bug and the workaround for it now. The bug is only happening if you attempt to load image OnPageLoad - in any other location it should be fine. Attached is the sample design with image. The workaround is the two lines before Load Image attempt which do not do anything except just making sure that the script goes through. You can remove it with the next release.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 2/2/2017(UTC) Posts: 22 Location: Tennessee Thanks: 1 times
|
|
|
|
|
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.