Hey marc,
we're using your Autocomplete function on a website which has been placed inside the root folder of our sitecollection. Inside this function gencontainerId() uses $.fn.SPServices.SPListNameFromUrl which then tries to access currentContext.thisList.length which throws an exception if the file is located inside the rootFolder.
My suggestion would be to change the following lines of code:
} else if(currentContext.thisList.length > 0) {
---- into ----
} else if(SPServicesContext.thisList !== undefined && SPServicesContext.thisList.length > 0) {
Regards, Andreas
we're using your Autocomplete function on a website which has been placed inside the root folder of our sitecollection. Inside this function gencontainerId() uses $.fn.SPServices.SPListNameFromUrl which then tries to access currentContext.thisList.length which throws an exception if the file is located inside the rootFolder.
My suggestion would be to change the following lines of code:
} else if(currentContext.thisList.length > 0) {
return currentContext.thisList;
}---- into ----
} else if(SPServicesContext.thisList !== undefined && SPServicesContext.thisList.length > 0) {
return SPServicesContext.thisList;
}
With this change SPListNameFromUrl returns nothing (which is correct in this case) and nothing changes for the regular case (as far as I can tell).Regards, Andreas