[Solved] Preview Tab Window Is Blank

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Preview Tab Window Is Blank

Post by KitchM »

Oh, bummer.

Well thanks anyway.
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Preview Tab Window Is Blank

Post by KitchM »

Could this problem be related to the one at:
http://forum.cmsmadesimple.org/viewtopi ... =7&t=71503?
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: Preview Tab Window Is Blank

Post by rotezecke »

i ran into this again today, and re-established the previously published snippet in config.php:

Code: Select all

if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') {
  $config['root_url'] = $config['ssl_url'];
}
it fixed issues i had with:
  • tinyMCE (not loading JS due to mixed protocols)
  • GBFilePicker (dito)
  • preview tab (not sure - didnt investigate as i usually dont use it)
it does break:
  • preview links in backend (now pointing at "https://...")
  • canonicals set incorrectly, when frontend pages normally accessed via http are accessed via https.
i ended up editing a core file (bad idea) to prevent the latter, but google somehow ended up indexing https pages (-> duplicate content).

if anyone has an idea how i can add an "i-am-an-admin-page-test" to the above if statement (without hacking core files), please let me know.
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Preview Tab Window Is Blank

Post by KitchM »

YaHooooooooo! ;D You fixed it!

That snippet of code in mydomain/public.html/config.php did the job for both preview and TinyMCE.

Thank you so very much. It is good to know that someone knows what he's doing. Most excellent work!!!!

You get an Attaboy and a big thumbs up!
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: [Solved] Preview Tab Window Is Blank

Post by rotezecke »

i changed the if statement to include a test for admin directory:

Code: Select all

if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on' && strpos($_SERVER['PHP_SELF'],$config['admin_dir'])!== false) {
  $config['root_url'] = $config['ssl_url']; 
}
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: [Solved] Preview Tab Window Is Blank

Post by KitchM »

I just tested your new code on mine and it still seems to be working great. Good idea about the additional part.

Thanks very much.
Post Reply

Return to “CMSMS Core”