<![CDATA[ NewsPub button.css - My Forums]]> https://forums.modx.com/thread/?thread=102920 <![CDATA[NewsPub button.css]]> https://forums.modx.com/thread/102920/newspub-button-css#dis-post-554235 NP 3.0.4

The button.css ’sheet that NP is adding to the head tag is using a relative url which is throwing a SSL browser warning.

I have configured the site to use absolute https urls which works fine except with this one NP asset.

I need to either force an absolute url or stop NP from loading the file.]]>
todd.b Oct 01, 2017, 04:24 AM https://forums.modx.com/thread/102920/newspub-button-css#dis-post-554235
<![CDATA[Re: NewsPub button.css]]> https://forums.modx.com/thread/102920/newspub-button-css#dis-post-554236
$assetsUrl = $modx->getOption('np.assets_url', null, MODX_ASSETS_URL . 'components/newspublisher/');
$modx->regClientCss($assetsUrl . 'css/button.css');


Since you don't have an np.assets_url System Setting, the code is using the MODX_ASSETS_URL, which should be https unless you've hard-coded a non-https URL in config.inc.php. I'm surprised this doesn't cause problems elsewhere.

Do you have code to force https in your .htaccess file? That might solve it.

If none of that helps, you can create a System Setting with the key: np.assets_url and put your absolute URL to the assets directory as the value. Be sure it ends in a slash. That should survive any upgrades to NP or MODX.



]]>
BobRay Oct 01, 2017, 04:47 AM https://forums.modx.com/thread/102920/newspub-button-css#dis-post-554236