Mixed Content Error in admin
-
If operating the site admin over HTTPS but the front-end of the site over HTTP a mixed content error occurs while editing a location, and the map is not useable.
The source of the error is this line in classes/locations.php:
wp_enqueue_script( 'sm-drag-drop-location-js', site_url() . '?sm-drag-drop-location-js=' . $post->ID, array( 'jquery' ) );
To fix, I changed this line to:
wp_enqueue_script( 'sm-drag-drop-location-js', admin_url() . '?sm-drag-drop-location-js=' . $post->ID, array( 'jquery' ) );
I don’t believe there is any downside to this, because the script is only used in the admin, correct? If so, it’d be great if this could make it into a future release so we don’t have to re-fix later.
Thanks,
Tim
- The topic ‘Mixed Content Error in admin’ is closed to new replies.