#26074 closed Cleanup/optimization (wontfix)
Vendor GIS js to circumvent mixed content
Reported by: | Josh Schneier | Owned by: | nobody |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The inclusion of http://openlayers.org/api/2.13.1/OpenLayers.js
(and presumably http://www.openstreetmap.org/openlayers/OpenStreetMap.js
) breaks in some browsers (Chrome and Firefox at least) due to mixed content warnings. One of the files I've attached is a shot of the admin lacking the ability to choose a GeoPoint.
My proposal is to vendor those two into Django.
Attachments (1)
Change History (7)
by , 9 years ago
Attachment: | Screen Shot 2016-01-12 at 1.40.29 PM.png added |
---|
comment:1 by , 9 years ago
Easy pickings: | set |
---|---|
Type: | Uncategorized → Bug |
Version: | 1.9 → master |
comment:2 by , 9 years ago
I have been bitten by this too, but vendoring should be a last-resort fix.
I have recently discovered a nice small lib for managing external JS/CSS/IMG dependencies, django-remote-finder. I think Django misses something like that to avoid vendoring js libs. This might be the subject of a new thread on the django-developers mailing list.
comment:3 by , 9 years ago
FWIW I've been using Bower with a simple entry in STATICFILES_DIRS
pointing to 'bower_components'
successfully in the past.
comment:4 by , 9 years ago
Easy pickings: | unset |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Type: | Bug → Cleanup/optimization |
The mixed content problem was also the subject of a previous ticket with documentation added in b7a7baa55471e67b98d509cddf2f0994f7ce786f.
I agree to pursue a better solution if possible, but agreed with avoiding vendoring. For the really ambitious solution, maybe some solution to replace the Media
class entirely (#22298). A thread on the DevelopersMailingList sounds to me like the best way to proceed.
comment:6 by , 9 years ago
@charettes: I evaluated bower, but as it requires installation of the full Node.js framework, it's a no-go for me.
@timgraham: I am aware of the documentation I committed (and I used that in my project), but the process of customizing widgets is currently too cumbersome. I agree with your mailing list suggestion, though.
@jschneier: linking to a CDN seems a bit brittle to me, I don't know if we can count on the link availability over time.
GeoPoint admin is blank