Why does "&" in UI Pages fail in some ServiceNow instances and not in others?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 02:51 PM
We are using UI Pages or specifically the XML definitions and we have one customer instance where the "&" fails while in all others, including during app certification it worked flawless.
The problem is with this line that creates a URL
myPage="/?CID=aaa1111&Embed=1";
which produced an error in one specific ServiceNow Helsinki instance. Everyone else is fine.
After lengthy troubleshooting, the customer found that replacing "&" with "${AMP}" would fix the problem.
Does anyone have any idea why it works on some instances and not on others? Is there a specific setting that disables the use of "&"?
Any suggestions?
Thanks a lot.
Here is an extract of the code. I took some parts out but this is what it looks like:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate jelly="true" var="myPage">
myPage="/?CID=aaa1111&Embed=1";
</g:evaluate>
<!-- Navigate to the URL -->
<script>
window.location=myPage;
</script>
<!-- Body to be displayed if the navigation fails. -->
<body>
This page should have navigated to the default ....
<br/>
</body>
</j:jelly>
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 10:26 PM
Is there any difference between the servicenow instances where it fails and where it doesn't?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2017 05:01 AM
I would assume that there is a difference but we dont know. Each instance has different cmdb content, setup, users, etc. - so I am fairly certain it has something to do with some settings but I dont know which one or where to look and comparing multiple ServiceNow instances top to bottom manually is not really practical.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2017 09:59 PM
Please let me know if you get the root cause