For subsites, the path to the library doesn't take into account the base path.
eg.:
My site is located at http://myhost.com/mysubsite/web
The library path in the UI is '/libraries/lazysizes'
So the library should be located at http://myhost.com/mysubsite/web/libraries/lazysizes/lazysizes.min.js
Instead, I get a message that http://myhost.com/libraries/lazysizes/lazysizes.min.js is not found.
I could of course set the path manually, but then the path to the library would be different on local vs live versions of the same site. That would be bad practice.
Solution: include the base path in the settings
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3282633-5.patch | 892 bytes | norman.lol |
Issue fork lazy-3282633
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
roger.bertran commentedI've created a patch to fix it, it works for me.
Comment #3
norman.lolComment #5
norman.lolThe current patch from #2 did not account for manually entered URLs in config.
We must cover both absolute library URLs and relative URLs with base path prefixed manually already.
Applied same changes as in #3463866: Fix library path if site inside subdirectory.