CMS MADE SIMPLE FORGE

JMFilePicker

 

[#11268] Doesn't load properly when SSL is enabled for Admin console

avatar
Created By: Eduardo Martinez (hexdj)
Date Submitted: Fri Jan 13 19:39:59 -0500 2017

Assigned To: Jeff Bosch (ajprog)
Version: 1.0
CMSMS Version: 1.12
Severity: Major
Resolution: None
State: Open
Summary:
Doesn't load properly when SSL is enabled for Admin console
Detailed Description:
When SSL is enabled, JMFilePicker won't load, it will display the spinning wheel
as seen here:
http://take.ms/h9adO

This is not an issue in non-secure sites. 
As soon as SSL is disabled it works normally.

This was carried over from GBFilePicker, which I reported here: 
http://dev.cmsmadesimple.org/bug/view/9473

SOLUTION:
Go to this file:
/modules/JMFilePicker/lib/class.gbfp_smarty_plugins.php

Find line 57: and replace $config['root_url'] with $config['ssl_url']

So your line 15 should now look like this:
return '<script language="javascript" type="text/javascript" src="' .
$config['ssl_url'] . '/modules/GBFilePicker/js/jsLoader.js"
defer="defer"></script>';


History

Comments
avatar
Date: 2018-09-04 16:26
Posted By: Laura Bennett (laura@drivebrandstudio.com)

I'm seeing this problem now with or without SSL enabled.  CMS version 2.1.6. 
JMFilePicker 1.0.1
      
avatar
Date: 2018-11-29 11:06
Posted By: Adam Koontz (ak-designworks)

Rather than adjusting the hard-coded $config['root_url'] param within the
module, I'd suggest adding something like this to your config.php file:

if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
{
  $config['root_url'] = $config['ssl_url'];
}

This sets all instances of root_url to the value of ssl_url site-wide for sites
that are HTTPS enabled.
      
Updates

Updated: 2017-01-14 00:17
assigned_to_id: 100 => 9737

Updated: 2017-01-13 19:42
description: When SSL is enabled, JMFilePicker won't load, it will display the spinning wheel as seen here: http://take.ms/h9adO This is not an issue in non-secure sites. As soon as SSL is disabled it works normally. This was carried over from GBFilePicker, w => When SSL is enabled, JMFilePicker won't load, it will display the spinning wheel as seen here: http://take.ms/h9adO This is not an issue in non-secure sites. As soon as SSL is disabled it works normally. This was carried over from GBFilePicker, w
resolution_id: => 5