Title: Mixed content blocked, https protected admin area, v2.4
Last modified: August 21, 2016

---

# Mixed content blocked, https protected admin area, v2.4

 *  Resolved [Herbert](https://wordpress.org/support/users/hneugebauer/)
 * (@hneugebauer)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/mixed-content-blocked-https-protected-admin-area-v24/)
 * I have posted a request on this topic quite some time ago
    [http://wordpress.org/support/topic/mixed-content-blocked-https-protected-admin-area?replies=5](http://wordpress.org/support/topic/mixed-content-blocked-https-protected-admin-area?replies=5)
 * The issue persists also in version 2.4 of the plugin.
 * I made several changes to the code and posted it back to the original author,
   hopefully it can be included in a future version.
    One challenge is that the 
   plugin loads code from external servers, like maps.googlecom, openstreetmap.org
   and openlayers.org. Some content can be included via https, but some not, as 
   those sites only work via http and not https. However the code from openlayers
   is Open Source. Therefor it should be totally legal to download the code form
   there (they provide instructions how to include it on your website!)
 * Change Log for people with php knowledge to try themselves:
 * 1) in osm.php, starting line 78, replace the definitions with this:
 *     ```
       if ( ! defined( 'OSMWP_CONTENT_URL' ) )<br />
       	define( 'OSMWP_CONTENT_URL', site_url() . '/wp-content' );<br />
       if ( ! defined( 'WP_CONTENT_DIR' ) )<br />
             define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );<br />
       if ( ! defined( 'OSMWP_PLUGIN_URL' ) )<br />
       	define( 'OSMWP_PLUGIN_URL', OSMWP_CONTENT_URL. '/plugins' );<br />
       if ( ! defined( 'WP_PLUGIN_DIR' ) )<br />
             define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );<br />
       define ("OSM_PLUGIN_URL", OSMWP_PLUGIN_URL."/osm/");<br />
       define ("OSM_PLUGIN_ICONS_URL", OSM_PLUGIN_URL."icons/");<br />
       define ("URL_POST_MARKER", OSM_PLUGIN_URL.POST_MARKER_PNG);<br />
       define ("OSM_PLUGIN_THEMES_URL", OSM_PLUGIN_URL."themes/");<br />
       define( 'OSM_OPENLAYERS_THEMES_URL', OSMWP_CONTENT_URL. '/uploads/osm/theme/' );<br />
       define ("OSM_PLUGIN_JS_URL", OSM_PLUGIN_URL."js/");
       ```
   
 * 2) create osm-config.php (from the sample that is included in the plugin)
 *     ```
       define ("Osm_LoadLibraryMode", SERVER_EMBEDDED);<br />
       define ("Osm_OSM_LibraryLocation", 'https://www.openstreetmap.org/openlayers/OpenStreetMap.js');<br />
       define ("Osm_OL_LibraryPath", OSM_PLUGIN_URL.'openlayers_2-12/');<br />
       define ("Osm_OL_LibraryLocation", OSM_PLUGIN_URL.'openlayers_2-12/OpenLayers.js');<br />
       define ("Osm_GOOGLE_LibraryLocation", 'https://maps.google.com/maps/api/js?sensor=false');<br />
       // OpenSeaMap scripts<br />
       define ("Osm_harbours_LibraryLocation", OSM_PLUGIN_URL.'openseamap/harbours.js');<br />
       define ("Osm_map_utils_LibraryLocation", OSM_PLUGIN_URL.'openseamap/map_utils.js');<br />
       define ("Osm_utilities_LibraryLocation", OSM_PLUGIN_URL.'openseamap/utilities.js');<br />
       define ("Osm_openweather_LibraryLocation", OSM_PLUGIN_URL.'openweathermap/OWM.OpenLayers.1.3.4.js');
       ```
   
 * 3) change line 140 in osm-options.php
 *     ```
       <li><?php _e('choose your maptype with this icon ','OSM-plugin') ?><img src="<?php echo Osm_OL_LibraryPath ?>img/layer-switcher-maximize.png" alt="map type icon"> <?php _e('in the map (google maps will have a license pop up in yor post/page)','OSM-plugin') ?></li>
       ```
   
 * 4) Download OpenLayers [http://openlayers.org/download/](http://openlayers.org/download/)
   
   The plugin is hardcoded to use version 2.12… but you can also try with the latest
   version. The download package includes instructions about what you really need
   on the web-server (the readme). see the osm-config.php for sub-directory to create
   and upload the files (you may change osm-config.php to update the directory name.
 * 5) Optional … fetch the openseamap js files … if you need openseamap at all.
 * This is not a totally complete step-by-step-guide. Please only do this, if you
   know php and can fill the “obvious steps” that are not listed above yourself 
   😉
 * [http://wordpress.org/plugins/osm/](http://wordpress.org/plugins/osm/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [MiKa](https://wordpress.org/support/users/photoweblog/)
 * (@photoweblog)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/mixed-content-blocked-https-protected-admin-area-v24/#post-4446369)
 * Hello Herbert,
 * the plugin version 2.4.1 implemented parts of your modifications, the SSL support
   for the backend will we covered with OSM Plugin Version 2.5.
    Whenever you make
   modifications in WP plugins you have to consider, the whole folder will be deleted
   with an update and your modifications are lost.
 * Thanks for sharing your coding!
 *  Thread Starter [Herbert](https://wordpress.org/support/users/hneugebauer/)
 * (@hneugebauer)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/mixed-content-blocked-https-protected-admin-area-v24/#post-4446371)
 * Thanks for the Update!
    Looking forward to 2.5 and I will skip 2.4.1. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Mixed content blocked, https protected admin area, v2.4’ is closed to
new replies.

 * ![](https://ps.w.org/osm/assets/icon-256x256.png?rev=2087144)
 * [OSM - OpenStreetMap](https://wordpress.org/plugins/osm/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/osm/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/osm/)
 * [Active Topics](https://wordpress.org/support/plugin/osm/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/osm/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/osm/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)

 * 2 replies
 * 2 participants
 * Last reply from: [Herbert](https://wordpress.org/support/users/hneugebauer/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/mixed-content-blocked-https-protected-admin-area-v24/#post-4446371)
 * Status: resolved