System asset tag no longer working
I was trying to update an xhtml block created 4 years ago. This block contains some javascript. When trying to submit, I am getting a java error. There isn't much in the block so I narrowed it down to the psuedo tag([system-asset]). It seems that this no longer resolved the url. The error I see when trying to submit is An error occurred: java.lang.NullPointerException.
<script src="/render/file.act?path=site://common/_internal/files/js/random4imageswcaptions.js" type="text/javascript"></script>
<script type="text/javascript">// <![CDATA[
$(document).ready(function(){
selectRandomImages("[system-asset:id=6dee97758185062c000b73e574c16456]/french/headerimages/header-images[/system-asset]", "#header-images", "[system-asset]/french/headerimages[/system-asset]", 262, 2);
});
// ]]></script>
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Tim on 28 Oct, 2015 08:51 PM
Hi,
I have a feeling that this line may be causing problems:
It appears as though that is attempting to link to a folder asset (which isn't possible). If you remove the[system-asset]
tags from just that portion of the code, does it allow for you to submit without the error?2 Posted by jvienneau on 29 Oct, 2015 12:56 PM
Hi Tim,
It does allow me to submit now. The strange thing is when this was created(2011), it was resolving fine. I'll have to modify the script to no longer need this. Thanks for your help.
Support Staff 3 Posted by Tim on 29 Oct, 2015 01:10 PM
Glad to hear that did the trick. I do seem to recall that this worked many years ago for a brief period of time (as you mentioned), but that functionality was actually never intended to work (oddly enough). I believe the first time we found out about it working was when some changes were made to the application that apparently made it stop working and we had a couple of folks report it at the time. That led to the creation of this idea on our Idea Exchange that I encourage you to vote on when you have the chance.
I just sent you an invite for that Idea Exchange so let me know if you have any trouble getting in. Otherwise, have a good one!
Tim closed this discussion on 29 Oct, 2015 01:10 PM.