Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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)

Screen Shot 2016-01-12 at 1.40.29 PM.png (24.9 KB ) - added by Josh Schneier 8 years ago.
GeoPoint admin is blank

Download all attachments as: .zip

Change History (7)

by Josh Schneier, 8 years ago

GeoPoint admin is blank

comment:1 by Josh Schneier, 8 years ago

Easy pickings: set
Type: UncategorizedBug
Version: 1.9master

comment:2 by Claude Paroz, 8 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 Simon Charette, 8 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 Tim Graham, 8 years ago

Easy pickings: unset
Resolution: wontfix
Status: newclosed
Type: BugCleanup/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:5 by Josh Schneier, 8 years ago

For the simplest solution why not link to cdnjs?

comment:6 by Claude Paroz, 8 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.

Note: See TracTickets for help on using tickets.
Back to Top