webbunny Posted July 4, 2023 Share Posted July 4, 2023 (edited) I am logged in as admin, and when I put the store into offline mode, I can't view the storefront anymore. My client - who is also a logged in admin - can. But I am the one who needs to maintain the store. What can I do to resolve this issue? Thank you for your time! Edited July 6, 2023 by webbunny Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 4, 2023 Share Posted July 4, 2023 (edited) Are you and the client using the same admin login details? However, I don't think that matters. When you set the store to the Offline state, the Clear Cache button should have caught your attention. Did you clear CubeCart's cache? And what exact version of CubeCart are you running? Edited July 4, 2023 by bsmither Quote Link to comment Share on other sites More sharing options...
webbunny Posted July 5, 2023 Author Share Posted July 5, 2023 We have separate login details. I also tried creating a new login, logging in on a different browser or on my phone and I can't see the storefront. I have used the Clear Cache button. I'm using CubeCart version 6.5.1. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 5, 2023 Share Posted July 5, 2023 In admin, Store Settings, Advanced tab, enable Debug mode. Enter your local IP address in the following field (www.showmyip.com). Save. When the next page loads, your browser may complain about an application wanting to show a popup window. Permit this. (You may need to close the popup and reload that page.) Unfortunately, Offline Mode does not allow the debug data to be sent. So we will need to make an edit to a file so that we can log some messages to the System Error Log. Two things: hopefully, you are familiar with editing a file on the server, and you are familiar with how to get your browser to show you the cookies being used. In the file /includes/functions.inc.php, near line 775, make this edit: Find: if ($GLOBALS['config']->get('config', 'offline')) { Change to: if ($GLOBALS['config']->get('config', 'offline')) { trigger_error("The store is offline. The admin is ".(Admin::getInstance()->is() ? "" : "not " )."logged in. The session_id is ".$GLOBALS['session']->getId()); Visit a page in admin. Note the cookie value(s) being sent back and forth. Then, visit the storefront page. Note the cookie value(s) being sent back and forth. Back in admin, view Error Log, System Error Log tab. Undoubtedly, the message will say that the admin is not logged in. Compare the session_id with the cookie value(s) noted earlier. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 5, 2023 Share Posted July 5, 2023 Above, I said: "Unfortunately, Offline Mode does not allow the debug data to be sent." Technically, the debug data gets 'spooled into session'. On the next legitimate page sent (likely, an admin page), the spooled data gets unspooled and is seen in the debug area. But this requires the same session between Offline Mode and accessing the admin. If these are the same session, we probably wouldn't be having this conversation. Quote Link to comment Share on other sites More sharing options...
webbunny Posted July 6, 2023 Author Share Posted July 6, 2023 You were right, the sessions were indeed mismatched. I solved the issue by closing the tabs and manually relogging in via the admin url (//admin_DIX54M.php). Not sure what caused the issue. session ids: cbt83nmdu81tkle6fpa0iv4p1e<-store front 59di37d3mq7sktidjam89k9ktp< admin p9v6efbe3ughn4q99smclcrvq9< cbt83nmdu81tkle6fpa0iv4p1e<- f3fv2b9rqanqol2556mtmm6d5l< edrqmb116qtoktb3865fr2iutv< cbt83nmdu81tkle6fpa0iv4p1e<- 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.