Topic Closed
Flynn
38 Posts
I have installed and activated the plugin "Site Maintenance Page". Works perfectly. However, if you log out and try to log in again, it does not work, the Maintenance Page always appears. Even if I enter mysitename/admin as the address.
3 years ago#10771

juergen
1.5K Posts
56.2K Downloads
16 Plugins
design, web development & visual effects

Edit [plugin directory]/controller/SiteMaintenancePage.php
and replace the whole WhichPage function (line 23 downwards) with this one:

    function WhichPage($page){
        global $addonPathData, $addonPathCode;
        $type = \gp\tool::SpecialOrAdmin($page);
        if (!common::LoggedIn() && $type != 'admin') {
            if ($this->config['enabled']) {
                global $smp_config;
                $smp_config = $this->config;
                gpPlugin::incl('view/maintenancemode.php');
            }
        }elseif (common::LoggedIn() && $this->config['enabled']) {
            msg('NOTICE: Site Maintenance Page is enabled. '
                . 'Only logged in users can see the site. ('
                . common::Link('Admin_SiteMaintenancePage', 'Disable Maintenance Page now', 'cmd=disable')
                .')');
        }
        return $page;
    }

This should do the trick.

3 years ago#10772

juergen
1.5K Posts
56.2K Downloads
16 Plugins
design, web development & visual effects

... oh and then use [your website url]/Admin to log in

edit: I crossposted it to the Plugin Support Forum
edit2: Please report back if it actually works reliably - I only tested it quickly.

Edited: 3 years ago#10773

Flynn
38 Posts

Hello Jürgen,

now it works like clockwork. Thumbs up!

3 years ago#10775

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

HH-Support

Company located in Tórshavn, Faroe Islands. * Webpage Design * Consultant & Provider of a wide range of programs for visually impaired and dyslextics.

Find out more about our Provider Spotlight

Log In

  Register