Jump to content

1-Click upgrade module - enable maintenance mode error


Recommended Posts

Hi, 

I am experience an issue trying to update from prestashop 1.7.6.8 to 1.7.8.8 using 1-Click upgrade module

The 1-Click upgrade module won't run because the checklist is not complete "Enable maintenance mode and add your maintenance IP " is not checked even though the ship is Maintenance mode. 

I tried installing previous versions of the model and they all "see" the shop is in maintenance mode but can't update because a newer version of the module exists. Once I update the module I get the "Enable maintenance mode" error again. 

I tried uninstalling and reinstalling the 1-Click upgrade module several times. Cleared cache for  Performance/Clear Cache, deleted cache from var/cache folder.

Module version is v4.15.0

Any ideas of what is wrong? 

1157543470_Screenshot2023-02-14141004.thumb.jpg.5939b091413e3637d55fc85c530ee467.jpg

Link to comment
Share on other sites

If I manually set PS_SHOP_ENABLE to 0 it makes no difference. 

I in maintenance tab I click add my ip address (it basically ads my PC ip address), when clicking the 1-click upgrade module I get the error: 

(1/1) OutOfMemoryException

Error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 8192 bytes)

in ConfigurationTest.php line 248

 

I am using the maximum amount of memory in PHP selector options: 512M

Do you think updating needs more memory? 

If I use previous versions of the 1-click upgrade module the maintenance check is green (ok).

1895479097_Screenshot2023-02-14144727.jpg.a5a6befead0384460aa90bbf19aea376.jpg180582859_Screenshot2023-02-14144848.jpg.6bb21ffa873698d21f47a57a63533e1f.jpg915120579_Screenshot2023-02-14145216.jpg.7748139016113f432beddb8d1371673e.jpg1031026706_Screenshot2023-02-14145410.thumb.jpg.cc0dc3224dd08e9dec1594ed8131576d.jpg

 

Edited by aurel85ro (see edit history)
Link to comment
Share on other sites

20 minutes ago, juanrojas said:

I had already seen this error in the past, but I don't remember the solution, make a copy of the site and update with a previous version of the module to see if it works for you

This is a copy of the website (I didn't want to risk on actual website). So I can confidently "play" on it. 

The problem when trying an older version of the 1-Click upgrade module is that when it makes it's check list it requires the latest version of the module so I can't upgrade, even if all other requirements (including maintenance mode) are green. 

When working with older module version I tried to modify the code in UpgradeButtonBlock.php (eliminating line 139 and 148) so that it will not check for latest version of module but it doesn't work, it still wants to upgrade module before all checklist is green. 

I have to mention I am not a programmer and the hack presented earlier was found on another forum, but it was related to an earlier version of prestashop (1.6 I think). Maybe I am doing it wrong and if executed correctly would work.  

Edited by aurel23ro (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hi!! On my side, the problem happens when I add the maintenance IP. If added, the 1-click update module stop working ... and I can not even look at the module, and the server sent me an error 500,

image.thumb.png.26466e3da394ee5d85545dfaab98226c.pngimage.thumb.png.a0d51e8433cb270937f878505fa52182.png

 

If I delete the maintenance IP, the module works again... 

There's always stupid problems while using this CMS....

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

the issue suppose to be a bug of the "1-click upgrade"  module; it's also in PS 8.x.x... the only way is updating PS manually.

However, also manual mode upgrade needs an hint: you have to edit the file upgrade.php at lines 47/48/49 because one more "up directory" command is missing: you have to add /..

Best regards.

yaKay team

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
18 hours ago, coyotemann said:

Having same problem trying to upgrade to PS8 from PS1.7, maintenance mode not working.

Is there any easy way to upgrade from 1.7.8 to 8.0? Any guide or module that works? Thanks

Hi CM... there r a few paid modules to migrate from the 1.7.x to the 8.x; I didn't find any free one!

It's not something you can do so easily by yourself (but that's my opinion) cause DB tables have some differences; you should spend some money buying a migration module or  buying a 3rd part software. If you have time and a bit of DB knoledges, you can doing imp/exp of DB tables (from the 1.7 to the 8) but be very careful cause not everything matches 100%. This last solution was what I did for my website! If you want to compare the differences, you can have a look on my ecommerce:

yakay.it (ps 1.7.x) and yakay.it/yak8/ (ps 8 with some small working in progress).

 

 

 

Link to comment
Share on other sites

hace 18 horas, kerami82 dijo:

I have the same problem :/. 1 click upgrade don't see maintenance mode.  When add my IP in maintenance then I have 500 error.

 

When turn on DEBUG mode and try acces to 1-clickupgrade, after 5 minutes I has info like on screenshot

 

blad.png

I will try it in a copy of my shop...

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Running new server with PHP8.1 and Prestashop 8.1.  Tried upgrading to PS8.1.1 Auto Upgrade failed with error:

Errors

[INTERNAL] /var/www/prestashop/modules/autoupgrade/classes/UpgradeTools/Translator.php line 90 - ArgumentCountError: 4 arguments are required, 1 given #0 [internal function]: sprintf() #1 /var/www/prestashop/modules/autoupgrade/classes/UpgradeTools/Translator.php(90): call_user_func_array() #2 /var/www/prestashop/modules/autoupgrade/classes/UpgradeTools/Translator.php(68): PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator->applyParameters() #3 /var/www/prestashop/modules/autoupgrade/classes/ZipAction.php(107): PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator->trans() #4 /var/www/prestashop/modules/autoupgrade/classes/TaskRunner/Upgrade/BackupFiles.php(80): PrestaShop\Module\AutoUpgrade\ZipAction->compress() #5 /var/www/prestashop/admin364rwe1tvcw1heuqmzc/autoupgrade/ajax-upgradetab.php(53): PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade\BackupFiles->run() #6 {main}

 

** Noticed it always stopped at one image.  Went to more options and turned off backup images and it worked.  But it looks like an issue with 1-click upgrade.  

Link to comment
Share on other sites

  • 1 month later...

Go to:

modules/autoupgrade/classes

    private function checkIsLocalEnvironment()
    {
        return in_array($this->getRemoteAddr(), ['127.0.0.1', 'localhost', '[::1]', '::1']);
    }

Change to:

    private function checkIsLocalEnvironment()
    {
        return in_array($this->getRemoteAddr(), ['your.ip.addres.here']);
    }

 

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
On 10/2/2023 at 11:20 AM, c64girl said:

Go to:

modules/autoupgrade/classes

    private function checkIsLocalEnvironment()
    {
        return in_array($this->getRemoteAddr(), ['127.0.0.1', 'localhost', '[::1]', '::1']);
    }

Change to:

    private function checkIsLocalEnvironment()
    {
        return in_array($this->getRemoteAddr(), ['your.ip.addres.here']);
    }

 

 

One year after I opened this topic I had this same issue with another website, and your fix worked. Although I don't think you provided the exact file name that needs to be modified: modules/autoupgrade/classes    File: UpgradeSelfCheck.php 

After I modified as you advised and I filled in my ip address in Maintenance Mode (I think it would work with any IP address), all checks went green and it allowed the store to be upgraded (using version 5.0 of 1-Click Upgrade Module). 

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...