Title: [Patch] colorpicker.js loaded as HTTP when using HTTPS
Last modified: August 30, 2016

---

# [Patch] colorpicker.js loaded as HTTP when using HTTPS

 *  [gbonvehi](https://wordpress.org/support/users/gbonvehi/)
 * (@gbonvehi)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/patch-colorpickerjs-loaded-as-http-when-using-https/)
 * Hi there,
    I’ve been using your plugin and it’s working great. There was a little
   issue that I fixed and I’m pasting the patch. When using HTTPS in the admin interface
   colorpicker.js is being included via HTTP and gives an error.
 *     ```
       diff --git a/site/wp-content/plugins/wp-better-attachments/libs/wp-settings-api-bootstrap/class.wp-settings-api-bootstrap.php b/site/wp-content/plugins/wp-better-attachments/libs/wp-settings-api-bootstrap/class.wp-settings-api-bootstrap.php
       index 9c1b13e..f85b93a 100644
       --- a/site/wp-content/plugins/wp-better-attachments/libs/wp-settings-api-bootstrap/class.wp-settings-api-bootstrap.php
       +++ b/site/wp-content/plugins/wp-better-attachments/libs/wp-settings-api-bootstrap/class.wp-settings-api-bootstrap.php
       @@ -139,7 +139,7 @@
        			// enqueue color picker js and css
        			wp_enqueue_script(
        				'artus-field-color-js',
       -				WP_PLUGIN_URL . '/' . dirname( plugin_basename(__FILE__) ) . '/colorpicker.js',
       +				plugins_url( 'colorpicker.js', __FILE__ ),
        				array('jquery', 'farbtastic'),
        				time(),
        				true
       ```
   
 * Cheers,
    Guillermo
 * [https://wordpress.org/plugins/wp-better-attachments/](https://wordpress.org/plugins/wp-better-attachments/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [dholloran](https://wordpress.org/support/users/dholloran/)
 * (@dholloran)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/patch-colorpickerjs-loaded-as-http-when-using-https/#post-6406596)
 * Thank you for bringing this to my attention I have applied the patch and it will
   be in the next update.
 * Thanks,
    Dan

Viewing 1 replies (of 1 total)

The topic ‘[Patch] colorpicker.js loaded as HTTP when using HTTPS’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-better-attachments.svg)
 * [WP Better Attachments](https://wordpress.org/plugins/wp-better-attachments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-better-attachments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-better-attachments/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-better-attachments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-better-attachments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-better-attachments/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [dholloran](https://wordpress.org/support/users/dholloran/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/patch-colorpickerjs-loaded-as-http-when-using-https/#post-6406596)
 * Status: not resolved