Notifications

463 views

Description

In the out-of-box "News Ticker" widget, the 'src' tag is used even though the resource it's pointed at first requires the evaluation of an angular expression. This causes an invalid web request to be made to the server before angular is fully loaded on to the page and gets a chance to evaluate the expression:
https://my-instance.service-now.com/%7B%7Bitem.image_field%7D%7D

This may seem harmless; however, if this is the last request made to the server before an SSO login is attempted, when the SSO redirects back to the instance, instead of being sent back to the Service Portal site you are instead sent to /navpage.do and get the following 404 error message page:

The page you are looking for could not be found.
{{item.image_field}}

As per the below AngularJS documentation, using an angular expression within a 'src' tag should be avoided as it causes an invalid web request to be made to the server. Instead the 'ng-src' tag should be used.
https://docs.angularjs.org/api/ng/directive/ngSrc

Steps to Reproduce

Pre-requisites:

  • An Istanbul instance with demo data
  • The Service Portal for Enterprise Service Management plugin installed (com.glide.service-portal.esm)

Steps:

  1. Log on to the instance.
  2. Navigate to Service Portal > Widgets.
  3. Open the News Ticker widget

Expected behavior:

  • All images with their source pointed at an angular expression should use the ng-src tag

Actual behavior:

  • On line 9, there is an image tag using the src tag:
    <img src="{{item.image_field}}" alt="..." class="img-circle">
  • When accessing a Service Portal page with this widget on it, the image still loads, but it causes an invalid request to be made to the server.

Workaround

Clone the News Ticker widget and replace the src tag on line 9 with a ng-src tag.

For example, this:
<img src="{{item.image_field}}" alt="..." class="img-circle">

Should be changed to this:
<img ng-src="{{item.image_field}}" alt="..." class="img-circle">


Related Problem: PRB742952

Seen In

There is no data to report.

Fixed In

Jakarta

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2017-01-23 22:40:51
Published:2017-01-11