Jump to content

1-Click upgrade module - enable maintenance mode not working


Recommended Posts

  • 2 weeks later...

Hello,

Same problem here, adding IP address does not help but does not give an error ... I'm trying to simply upgrade from 1.7.8.8 to 1.7.8.10, all modules are up to date, maintenance is activated but one-click upgrade still says that I have to be in maintenance. It's a multi-store environment but with just one store active at the moment, and I did put all stores in maintenance.

I read quite a few threads about this, tried many solutions to no avail, one-click still says to activate maintenance ... is there a place where I could see an error or some log giving the reason of one-click deciding I'm not in maintenance ? Only solution I see now is to manually upgrade ...

Pierre

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Hi,

You can try enabling maintenance mode from the code as per the below PHP script example.

Create a PHP script in your PrestaShop root directory (for example maintenance.php) with the following code:

<?php

include_once('config/config.inc.php');
include_once('init.php');

if (!defined('_PS_VERSION_')) { exit; }

// Define the path to your PrestaShop config file
define('_PS_ROOT_DIR_', __DIR__);

// Include the PrestaShop configuration
include(_PS_ROOT_DIR_.'/config/config.inc.php');

// Enable maintenance mode
Configuration::updateValue('PS_SHOP_ENABLE', 0);

// Display a message to inform visitors
Tools::displayMaintenancePage();

// This script should not be accessible directly in the browser, so exit here
exit;

?>

This script includes the PrestaShop configuration, updates the 'PS_SHOP_ENABLE' configuration value to 0 (maintenance mode enabled), and then displays the maintenance page using Tools::displayMaintenancePage().

To disable maintenance mode and make your store accessible again, set the 'PS_SHOP_ENABLE' configuration value back to 1 (enabled).

Link to comment
Share on other sites

I did a post back in august and I have not up to now solved this problem.

@Zohaib-fk problem is not activating maintenance (it is activated), problem is one-click upgrade not recognizing the fact that maintenance is activated. Your suggestion is to say that programmatically activating maintenance will force one-click upgrade to recognize that it is activated ? did you have the same problem and this action did resolve it or is it just an idea ?

Thks.

Pierre.

Link to comment
Share on other sites

Hello,

Not "again", you asked that question to somebody else before my post ! Not sure why you want a screenshot, my problem was back in august (so the only valid screenshot would have to be dated from august, the current state is not very relevant). I was just answering to @Betz Developer who is mentioning hitting the same wall ...

But yes it's there right now and was there back in august. I cannot make tests on a short notice because this prestashop instance is used as a cashier in a physical shop (kerawen extension), I didn't try again recently but I will schedule an attempt as soon as possible because I see there is a new update to the one-click module (v4.16.2 arrow_forward v4.16.4 ) which was not available back in august, so maybe something was fixed, I will report here if my new attempt succeeds or fails.

Link to comment
Share on other sites

On 8/28/2023 at 4:52 AM, Pierr0t said:

I'm trying to simply upgrade from 1.7.8.8 to 1.7.8.10, all modules are up to date, maintenance is activated but one-click upgrade still says that I have to be in maintenance.

You started with 1.7.8.8 or do you have more history prior to that?

Link to comment
Share on other sites

1 hour ago, Pierr0t said:

Oh a lot of prior history, coming from 1.6, 1.6 to 1.7 was accomplished back in 2020 and site has been regularly updated ever since.

How large is that shop? Maybe its time for you to look for a all new shop?  One without any issues. 

Link to comment
Share on other sites

1 hour ago, Pierr0t said:

because some module has a bug,

Is that module from Prestashop, have you tried to reach prestashop directly? 

As a workaraound: Set up a clone locally and do all the changes you wish to implement there.

Link to comment
Share on other sites

  • 4 months later...

I just wanted to update this topic. I made a new attempt at upgrading this shop and was again facing the same problem, ie the 1-click upgrade module not recognizing the maintenance mode. Of course I tried all the suggestions, and more like suppressing and reinstalling the module, and after many many tests I found the culprit. This shop is in fact a multi-shop where the second shop has been disabled at least 2 years ago, and I had to give that second shop an url to be able to put it in Maintenance Mode and then I was able to upgrade.

Prestashop wont let me destroy that second shop because it says there are still clients attached ... I also had to go into the database to de-activate that second shop, PS wont let you suppress the main url of a shop without giving a new url which I didn't want ...

So this means that to upgrade all shops have to be in maintenance mode, even the ones not activated and/or without even an url ...

Pierre

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...