WordPress.org

Ready to get started?Download WordPress

Forums

Reed Write
FORCE_SSL_ADMIN Breaks Image Field (2 posts)

  1. cslinfotech
    Member
    Posted 9 months ago #

    Using ReedWrite 1.5.6 and WP 3.7.1. I've created a custom post type that has an image field. When I go to create a new post within my custom post type, I get a button that says 'Add an Image' which works great until I turn on the FORCE_SSL_ADMIN setting in wp-config. At that point, when I click the 'Add an Image' button, I get the small centered pop-up window, but the media library never loads within that window, and I think I know why.

    The 'Add an Image' button gets created like this:

    <a href="'.get_bloginfo('url').'/wp-content/plugins/reed-write/field_types/select_image/select_image_popup.php...

    But get_bloginfo() returns a URL to my site that begins with HTTP rather than HTTPS. Because I use Chrome - which by default blocks insecure content on secure pages - the media browser never loads when I try to add an image.

    The behavior of get_bloginfo() here is correct. If I updated the Site URL in the WordPress settings of my site to include HTTPS, then get_bloginfo() would return an HTTPS URL, and the issue above would be fixed. But that would force SSL on all my site visitors, which is not what I want to do. What about just using a relative path, like so:

    <a href="/wp-content/plugins/reed-write/field_types/select_image/select_image_popup.php...

    For now, I've downgraded from FORCE_SSL_ADMIN to FORCE_SSL_LOGIN, which works as a short-term fix, but obviously I'd rather not degrade my security to keep a plugin. (No matter how great it might be!)

    Looking forward to your solution. Thanks!

    http://wordpress.org/plugins/reed-write/

  2. ukando
    Member
    Posted 7 months ago #

    Have the same problem. Getting insecure content blocked inside of the admin, when using define('FORCE_SSL_ADMIN', true);

Reply

You must log in to post.

About this Plugin

About this Topic