sympmarc / SPServices

SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"siteRoot" initialized wrong in function "SPServiceContext"

LordPalpatine opened this issue · comments

If the SharePoint-address contains portnumbers (e.g. http://knlemosswebtest04:8081), the initialization of the variable "siteRoot" in the function "SPServicesContext" is done wrong:

var siteRoot = location.protocol + "//" + location.host + (location.port !== "" ? location.port : "");

location.host is already delivering the hostname + port. In this case the port will be addes twice:
spservice_1

The correct way should be: var siteRoot = location.protocol + "//" + location.host;