I'm trying to reference a JS file in (multiple) site-collections by using a Custom Action with Location=ScriptLink as described by sadomovalex. Referencing the file in the site-collection where the file is located (Style Library) only works when the ScriptSrc is given as
When I try using the server-relative or absolute path which I would need for other site-collections like
every single page dies without a user visible error just displaying nothing and the ULS give me these errors
Unexpected CannotMakeBrowserCacheSafeLayoutsUrl: 15/0/0//style library/mylib.js
Unexpected CannotMakeBrowserCacheSafeLayoutsUrl: 15/0/0/http://myserver.local/style library/mylib.js
but no further hint, what I might be doing wrong.
Do you have any suggestions to get this working properly?