Post by barkeyo » Mon Feb 06, 2017 9:03 pm

Hi All,

OC 2.3.0.2

Copied OC1.5.6.4 version of site files to a /test/ subfolder of main website, created new DB and copied original DB to new DB. Then edited .htaccess and both config.php files (root + admin) in the test folder to reflect the new path to the site in the test folder and new DB.

Successfully upgraded the test site and database to OC2.3.0.2, then set about finalising off the re-build. Had everything working ok from the test folder, so then removed old version of site in the root folder, copied everything out of the test folder back into the root, re-edited the .htaccess and both config.php files to reflect revert to root path and logged back in perfectly ok to the admin of the new site. So far so good I thought.

Unfortunately not quite. With Maintenance Mode on in the new site, even while logged into the admin, the front end continues to show me maintenance mode. Flushed browser cookies and session data etc, double checked .htaccess and config.php files, and still no go.

Now the strange thing. If I log into the admin area of the original test folder version of the new site, then the front end of the main version of the site comes out of maintenance mode for me. Why?

I don't understand why the admin token when logging into the backend isn't working, but a token from the test site backend does, despite the relevant .htaccess and config.php files in the root pointing to the correct paths.

Any guidance here would be deeply appreciated.

Thanks.

Newbie

Posts

Joined
Wed May 14, 2014 4:28 am

Post by thekrotek » Tue Feb 07, 2017 4:42 am

This is how OpenCart works: in maintenance mode it always shows the warning message instead of store front.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by barkeyo » Tue Feb 07, 2017 6:12 pm

Much appreciate you replying, but your response is clearly not accurate.

The whole purpose behind maintenance mode, is that when you login to the back end as administrator, you see the front end as normal. Only people visiting the front end as normal (i.e. not logged in as admin) should be seeing the maintenance mode message. This has always been the expected behaviour, and functioned perfectly fine on my original OC 1.5.6.4 site, and worked exactly the same on my test version of the OC 2.3.0.2 site, but for some reason since transferring the test site into the live directory, doesn't work correctly now.

Newbie

Posts

Joined
Wed May 14, 2014 4:28 am

Post by thekrotek » Tue Feb 07, 2017 7:23 pm

I, of course, know, what the purpose of maintenance mode is. And it DOES work for admin user, when he is logged on back-end, I've just checked. Yet you still need to login as customer to do anything with the store. Admin user is still not logged and can't do anything, related to customers specifically.

Users and customers don't mix. So start with checking, whether you're logged in already as customer.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by barkeyo » Tue Feb 07, 2017 7:57 pm

Hi,

I thought I was being clear, but may be not.

On my OC 2.3.0.2 test site, which resides in a subfolder of my server's public_html folder, when I log in to the admin back end as TOP ADMINISTRATOR (not as a customer) the front end can be viewed normally without the maintenance mode message being shown.

On my OC 2.3.0.2 main site, which is a direct copy of the test site, but with updated .htaccess and config.php files to remove the test subfolder from the paths, when I log in to the admin back end as TOP ADMINISTRATOR (not as a customer) the front end remains showing maintenance mode.

However, if I log in to the admin back end of the test site as TOP ADMINISTRATOR, the front end of the main site can now be viewed normally without the maintenance mode message being shown.

I'm not saying this is a bug with OC, I just can't understand why the above behaviour is occurring and how to correct it. I simply want to be able to log in to the back end of my main site as Top Administrator and then view the front end normally.

Newbie

Posts

Joined
Wed May 14, 2014 4:28 am

Post by thekrotek » Tue Feb 07, 2017 9:10 pm

Might be session related issue. User info is taken from "registry" properly, so either path is wrong somewhere and registry is loaded from another site or sessions mix. I have several installations of OpenCart on my server and they don't even aware of each other. In your case they, apparently, are aware due to some configuration error.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by barkeyo » Tue Feb 07, 2017 11:11 pm

Hi,

That's what I'd sort of guessed, and I think you are right, but the question is... where?

I have double checked all the path strings in the two config.php files (root and admin folder versions) of my main web folder site, and they are exactly as they would be on a fresh install of OC.

The .htaccess file has -

RewriteBase /

So that's correct too.

Beyond that I'm struggling for ideas as to where to look. I've deleted cookies and session data from my browser, flushed the cache, used different browsers, and still the same.

Newbie

Posts

Joined
Wed May 14, 2014 4:28 am

Post by thekrotek » Wed Feb 08, 2017 12:44 am

barkeyo wrote:The .htaccess file has - RewriteBase / So that's correct too.
For your main site, yes. For your test site it should be /subfolder

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by barkeyo » Wed Feb 08, 2017 12:54 am

Hi,

Yes I know. I edited that when I migrated the OC 2.3.0.2 site from the test folder to the live folder.

.htaccess file in test folder has RewriteBase /test/
.htaccess file in main folder has RewriteBase /

Newbie

Posts

Joined
Wed May 14, 2014 4:28 am

Post by thekrotek » Wed Feb 08, 2017 4:43 am

Try /test (without trailing slash). Your cookies or session might've being saved improperly. They depend on host name pretty much.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by barkeyo » Wed Feb 08, 2017 5:13 am

It wasn't the site located in the subfolder that was behaving incorrectly, it's the one in the root web folder, i.e. the one that requires the .htaccess file set to RewriteBase /

I've completely removed the /test/ folder and it's OC files from the server now, just to avoid any potential conflicts with the main site, but still I can't view the front end while logged in to the Admin Panel.

Other than the .htaccess and config.php files, I also can't find anywhere else in the OC files where an absolute path is defined, so it looks like everything is supposed to function in relation to the contents of those three files.

I even tried doing a complete fresh install of OC 2.3.0.2 onto the webserver with a clean database earlier today, but even that exhibits the same problem. :bang:

Newbie

Posts

Joined
Wed May 14, 2014 4:28 am

Post by studio1982 » Thu Apr 06, 2017 4:38 am

Hi, Does anyone know if this issue has been resolved?

I have installed two clean Opencart sites for two separate customers and have the same issue with both. Even when logged in as admin i am unable to see the site, instead i only get the maintenance page. I am using version 2.3.0.2, but i have 3 other installations 2.2.x and 2.0x that have worked without this issue and i've done nothing differently?

Newbie

Posts

Joined
Tue May 12, 2015 7:52 pm

Post by barkeyo » Thu Apr 06, 2017 6:05 am

No, this issue is still unresolved. As a result I've had to make any changes that impact the website front end, on the system while it's still live. Incredibly risky, potentially embarrassing, hugely frustrating and very unprofessional.

Newbie

Posts

Joined
Wed May 14, 2014 4:28 am

Post by ravim » Wed Mar 04, 2020 9:29 pm

I found php.ini was absent and causing same issue. Once placed with php.ini , it started working fine for admin (if logged in)

Newbie

Posts

Joined
Wed Mar 04, 2020 9:23 pm

Post by straightlight » Wed Mar 04, 2020 9:37 pm

ravim wrote:
Wed Mar 04, 2020 9:29 pm
I found php.ini was absent and causing same issue. Once placed with php.ini , it started working fine for admin (if logged in)
Good to know. I once experienced this issue with another user in the past. Take note that .user.ini file may also help, in this case, based on the server's specifications.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Wed Mar 04, 2020 9:42 pm

Added in FAQ. Thank you.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 10 guests