We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • If it’s set to offline, it doesn’t render pages at all; it should return a new error page and a 503 response. It will not parse tags, because the whole point of being offline is to not be dependent on the database, and without the database, parsing is useless. This is why there is now a core/error/unavailable.include.php which is rendered when the site is offline or some other major error prevents the engine from working...
      • 22629
      • 194 Posts
      Hi Jason,

      I disagree with that, and would be seriously disappointed if that’s the way it will work when it’s released.
      The way I currently work with 0.9.6 is if I need to take my site offline for maintenance, or if I need to do anything like re-arranging pages or upgrading the database server, I take the site offline and put an appropriate message in the config.

      A custom page on the front-end, which fits in with all the usual templates, then shows the appropriate message (using [(site_unavailable_message)] ) to the user.

      I can understand having a custom error page if a fatal error prevents correct rendering of a page, but just taking the site offline, I believe should still be parsed by the system, as it’s an administrator decision to take the site offline, and not an error.

      Surely you’ve still got to contact the database to determine if the site’s offline anyway, so if you can do that, then the system knows the database is available and can parse the "offline" page. If it can’t, then a "fatal error" has occurred, and the filesystem "unavailable" page should be shown.

      In either case, at the moment it still outputs my template, just doesn’t parse any tags. The other point, is I was still logged in, so it should still behave as normal while the manager is logged in.

      Andy
        Andy Shellam | www.networkmail.eu | @Pandy06269 @NetworkMail

        modx Revolution 2.2.6
        Windows 2012 | IIS 8 | php 5.4.11 | MySQL 5.5.29

        Content-Managed Websites Built on MODX
      • Quote from: Pandy06269 at Aug 03, 2008, 06:36 PM

        I can understand having a custom error page if a fatal error prevents correct rendering of a page, but just taking the site offline, I believe should still be parsed by the system, as it’s an administrator decision to take the site offline, and not an error.

        Surely you’ve still got to contact the database to determine if the site’s offline anyway, so if you can do that, then the system knows the database is available and can parse the "offline" page. If it can’t, then a "fatal error" has occurred, and the filesystem "unavailable" page should be shown.

        In either case, at the moment it still outputs my template, just doesn’t parse any tags. The other point, is I was still logged in, so it should still behave as normal while the manager is logged in.
        No, you do not have to contact the database to determine if the site is offline; that can all be done now without a connection to the database, but if you use site_unavailable_message, there is not going to be any parsing available. Only if you set a site_unavailable_page in the system settings (which doesn’t seem to be in the configuration of Revolution by default, but you can add this setting). When adding site_unavailable_page with a value of 1, and clearing the site cache after doing so (you should do this for now as changing settings does not automatically refresh the cache at this time in Revolution), all of my tags rendered fine on my unavailable page. Is this what you are attempting to do?
          • 22629
          • 194 Posts
          Quote from: OpenGeek at Aug 03, 2008, 06:52 PM

          No, you do not have to contact the database to determine if the site is offline; that can all be done now without a connection to the database, but if you use site_unavailable_message, there is not going to be any parsing available. Only if you set a site_unavailable_page in the system settings (which doesn’t seem to be in the configuration of Revolution by default, but you can add this setting). When adding site_unavailable_page with a value of 1, and clearing the site cache after doing so (you should do this for now as changing settings does not automatically refresh the cache at this time in Revolution), all of my tags rendered fine on my unavailable page. Is this what you are attempting to do?

          Hi Jason, that works thanks. Is that previous behaviour still going to be available in the final release?
          I take it you’ve not yet finished the "offline" support, as with the default behaviour, MODx still outputs my own template - not the error page.

          My main concern is a situation that seems to be happening at the moment in the current alpha stage:

          - I take my site offline to do some maintenance
          - everyone else sees the "unavailable page" - either the site_unavailable_page or the filesystem page
          - when I’m trying to use the site (and logged in), no tags get parsed so I cannot view my changes without putting the site online again

          e.g. the site still needs to work as if it was online when a manager session is logged in - it doesn’t at the moment.
            Andy Shellam | www.networkmail.eu | @Pandy06269 @NetworkMail

            modx Revolution 2.2.6
            Windows 2012 | IIS 8 | php 5.4.11 | MySQL 5.5.29

            Content-Managed Websites Built on MODX
          • Quote from: Pandy06269 at Aug 03, 2008, 08:11 PM
            My main concern is a situation that seems to be happening at the moment in the current alpha stage:

            - I take my site offline to do some maintenance
            - everyone else sees the "unavailable page" - either the site_unavailable_page or the filesystem page
            - when I’m trying to use the site (and logged in), no tags get parsed so I cannot view my changes without putting the site online again

            e.g. the site still needs to work as if it was online when a manager session is logged in - it doesn’t at the moment.
            I see the problem now... can you add a JIRA ticket for this Andy (if you have an account over there)? If you’ll do that, I’ll make sure this gets sorted for beta.
              • 22629
              • 194 Posts
              Hi Jason,

              Apologies for the delay; logged as http://svn.modxcms.com/jira/browse/MODX-247 in JIRA.

              Thanks,
              Andy
                Andy Shellam | www.networkmail.eu | @Pandy06269 @NetworkMail

                modx Revolution 2.2.6
                Windows 2012 | IIS 8 | php 5.4.11 | MySQL 5.5.29

                Content-Managed Websites Built on MODX