Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Experience fragment plain.html rendition arrayIndexOutOfBound Exception when href starts with #

Avatar

Level 1
Exception: line#94 arrayIndexOutOfBound Exception if used # in href while accessing with plain.html. 
aemerror.jpeg
1 Accepted Solution

Avatar

Correct answer by
Level 5

In that case you can check the same before you call this method and it will solve your issue for now.

View solution in original post

0 Replies

Avatar

Level 5

That's because when you have just "#" in the path and try splitting it using "/" then the array length will be 1 holding the original value and which means you can just access 0th index.

To solve this issue, put a if statement before line no 94 to check if there is "/" character present in the path. Something like this:

if(path.contains("/")) {

 //line no 94

} else {

pathPrefix = path;

}

 

 

Avatar

Correct answer by
Level 5

In that case you can check the same before you call this method and it will solve your issue for now.