Jump to content

Offline mode doesn't allow me to see the store as admin (Resolved)


webbunny

Recommended Posts

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 by webbunny
Link to comment
Share on other sites

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 by bsmither
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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<-

Link to comment
Share on other sites

  • webbunny changed the title to Offline mode doesn't allow me to see the store as admin (Resolved)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...