11thhour Posted August 27, 2016 Share Posted August 27, 2016 Hi everyone, I have my store turned off and have allowed administrators to view the store off line. It use to work like that just fine, but now while in admin when I click store home it goes to the page I have for when the site is off not the store itself. Does anyone know how I might be able to fix this? I tried clearing the cache and admin logs and also clearing browser history, cookies and cache. Any help would be appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted August 27, 2016 Share Posted August 27, 2016 Since it used to work properly, can you list what changes have been made since it was known to work? What version are you on now, and is that different from when it was working? Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 27, 2016 Share Posted August 27, 2016 "and have allowed administrators to view the store off line" This setting does not appear in the latest versions of CC6. When working properly, there is a fat red banner across the top (may be specific to Foundation) advising the admin that the store is being shown for admin purposes and is actually offline. Quote Link to comment Share on other sites More sharing options...
11thhour Posted August 27, 2016 Author Share Posted August 27, 2016 Hi, I'm running Version 4.4.2 The last issue I had was a warning about time zones on my admin panel and bsmither helped with that by having me change some code to whats below. For CC442, in ini.inc.php: Find near line 131: ## default encoding UTF-8 ini_set('default_charset','UTF-8'); //date_default_timezone_set('UTC'); Change the last line to: date_default_timezone_set('Amaerica/New_York'); Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 27, 2016 Share Posted August 27, 2016 Did I misspell Amaerica? If I did, I'm sorry. But this shouldn't affect how CC442 works with respect to the store being offline. Quote Link to comment Share on other sites More sharing options...
11thhour Posted August 27, 2016 Author Share Posted August 27, 2016 I did have to do this also just before last issue after receiving a fatal error message. Please download the latest CC4 package from Cubecart.com Downloads page. Replace only the files index.php and admin.php on your site. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 27, 2016 Share Posted August 27, 2016 I will double-check - but I would think this does NOT have any influence regarding the store being offline. Be back shortly. Quote Link to comment Share on other sites More sharing options...
11thhour Posted August 27, 2016 Author Share Posted August 27, 2016 bsmither, Dirty butter corrected the spelling before I changed it. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 27, 2016 Share Posted August 27, 2016 I'm not sure if this ever worked properly. But, I haven't actually worked with CC4 much at all. so if it did work properly, I would be surprised. Let me see if I can make it work properly. Quote Link to comment Share on other sites More sharing options...
11thhour Posted August 27, 2016 Author Share Posted August 27, 2016 That would be great if you could figure something out that would fix my issue. I really appreciate the help. Thanks! Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 28, 2016 Share Posted August 28, 2016 In CC4's index.php, near line 102: Using a programmer's text editor, find: if(($config['offLine']==1 && isset($_SESSION[CC_ADMIN_SESSION_NAME]) && $config['offLineAllowAdmin']==0) || ($config['offLine']==1 && !isset($_SESSION[CC_ADMIN_SESSION_NAME]))) Change to: if(($config['offLine']==1 && isset($GLOBALS[CC_ADMIN_SESSION_NAME]) && $config['offLineAllowAdmin']==0) || ($config['offLine']==1 && !isset($GLOBALS[CC_ADMIN_SESSION_NAME]))) This is a quick and dirty solution. Someone who knows what they are doing can forge a cookie such that CC4 now will show the storefront where otherwise would be shown the offline page. Quote Link to comment Share on other sites More sharing options...
11thhour Posted August 28, 2016 Author Share Posted August 28, 2016 bsmither, Sorry for late response, was a late night. I just changed the code as you suggested and that did the trick. I'm not sure how these things get changed but I'm sure glad there are guys like you to help. Thanks again! Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 28, 2016 Share Posted August 28, 2016 "I'm not sure how these things get changed" I think the code in the file index.php for CC448 (the latest version which previously you were instructed to use) wasn't checked for this scenario. So, this may be a bug that is still present for others who are running CC4. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.