We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

MSM random pages 'Offline' even to logged in Admins

Development and Programming

energycell's avatar
energycell
18 posts
5 years ago
energycell's avatar energycell

EE 3.5.16 MSM with 3 sites.

3 pages on a new site that has been added to our MSM display the ‘System Offline’ message even though I am logged in as a super admin, other pages are visible as they should be.

I f I put the site online all pages are visible.

If I create a new page sometimes it will visible to admins when the site is offline, sometimes a new page returns the offline message.

I’ve looked over the content and templates and can’t see anything different.

Any ideas welcome

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
5 years ago
Robin Sowell's avatar Robin Sowell

That’s baffling. Sounds like it’s seeing you as not logged in. No chance the difference is the subdomain, is there? So www.mysite.com pages show, but mysite.com pages don’t- or vice versa? That would be cookie domain.

Try turning browser tools on and checking the headings on a page that works and one that doesn’t- see if that suggests anything useful.

       
energycell's avatar
energycell
18 posts
5 years ago
energycell's avatar energycell

Hi, thank you for your reply.

We don’t use subdomains on the site, we use: www.mysite.com/en, www.mysite.com/de.

The headers show that a 503 is returned for that page, but it works on other servers.

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
5 years ago
Robin Sowell's avatar Robin Sowell

I was thinking that www is a subdomain- if you login on it, if you don’t have a cookie domain set, you won’t be seen as logged on on mysite.com (without the www).

It sounds like the page works fine with the site online, and the only reason I can think for displaying that offline message is the system sees you as logged out. That could happen going from www.mysite.com to mysite.com.

I won’t totally discount some sort of cache or even a load balanced server with a slight time difference, resulting in being seen as logged out.

If you’ve got the same install on multiple servers and it only happens on one, that does suggest something environmental might be at play.

It’s weird- I don’t recall running into it before.

       
energycell's avatar
energycell
18 posts
5 years ago
energycell's avatar energycell

I’ve replicated it locally and tried a bit of debugging.

The problem seems to be around line 189 in

/system/ee/EllisLab/ExpressionEngine/Core/Core.php

‘call_user_func_array’ doesn’t return anything when the site is offline, even if I var_dump it.

I tried adding the following:

  $controller = 'EE Object'
  $method = 'index'
  $params = array()

  if ( is_callable($controller) ) {

     call_user_func_array(array($controller, $method), $params);

  } else {

   echo 'here';

  }

it seems that it’s not callable.

       
energycell's avatar
energycell
18 posts
5 years ago
energycell's avatar energycell

Is this PHP version issue maybe?

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
5 years ago
Robin Sowell's avatar Robin Sowell

No, I don’t think so. Not with it only affecting 3 pages.

If it were me, I’d start debugging in system/ee/legacy/controllers/ee.php - just var_dump some debug where it’s defining $can_view_system and make sure it’s TRUE for the pages that don’t show.

I’d make sure of that before following it down the line to Core.php. And I’d probably have a page that shows and a page that doesn’t open side-by-side and compare the dumped debug.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.