Jump to content

Presta upgrade 1.6.14


Recommended Posts

i reistalled my 1.6.10 backup but on upgrading get this error and the upgrade stops.

Analyzing the situation...Shop deactivated. Extracting files...
File extraction complete. Removing sample files...
All sample files removed. Now backing up files.
[Ajax / Server Error for action backupFiles] textStatus: "error " errorThrown:"Internal Server Error " jqXHR: " "
Link to comment
Share on other sites

Those Ajax error messages in Prestashop look always like this.

 

You can however use a debugger to see what they actually got returned. 

 

In Chrome you press F12, then you choose Network, then you click on the last POST command. In the Response tab you will be able to see what was returned.

Link to comment
Share on other sites

Upgrading from 1.6.1.13 to 1.6.1.14, I also got this error, which broke the upgrade and the shop as well (Restored back to 1.6.1.13).

 

I guess 1.6.1.14 has an issue, this is the very first time one-click-update fails to me...

 

 

 

Error line says :

[Ajax / Server Error for action backupFiles] textStatus: "error " errorThrown:"Internal Server Error " jqXHR: " "

Link to comment
Share on other sites

I was trying to upgrade from 1.6.7 to 1.6.14 prestashp, and it always failed giving some ajax or other funny error and also failed to restore back.


 


Deleted the cache>cachefx folder, and in 1click upgrade disabled backup options, and since i have a dedicated server


i increased the server performance to highest.


 


It upgraded without any errors and also very fast to Prestashop 1.6.14.


 


Hope it helps some soul in trouble:)


Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

THIS PROBLEM IS SOLVED. SEE BELOW

 

When trying to update the shop using 1 Click Update module I encountered numerous times this kind of error:

 

" errorThrown:"Internal Server Error " jqXHR: " "

 

After many trials and errors I discovered that the this error was triggered by 1 Click Update module for PS 1.6 (the last version available for this module as of today is 1.6.7), which is not being capable of working properly (i.e  it hangs on database update, yet manages to update all files) on PHP 7.1.

I tested numerous times. The 1 click update module version 1.6.7 works flawlessly on PHP 5.5, PHP 5.6 and, to my surprise, even on PHP 7.0.

 

And as I said before, it hangs when working on PHP 7.1

And a lot of people are using PHP 7.1 today, even they do not know it (webhosts have upgraded overnight without notice, from PHP 7.0)

 

Workaround /Solution

 

If you are on Cpanel, and you have a good host, that permits "Select PHP version" button to appear in Cpanel, go to "Select PHP version" button (see attached screnshots),  then enable PHP 5.6 with default options (works definitely) and only after that run 1 Click Update module. (If you do not see the Select PHP Version button, just email your webhost. It's as simple as 2 clicks for them to allow it on your Cpanel.)

 

In order for this trick to work, please pay attention that you have the same modules enabled in PHP 5.6 that you have enabled in PHP 7.1, otherwise you will only see a blank page. Just write down the modules you have enabled in PHP 7.1 and enable the same modules in PHP 5.6.

 

Of course it is wise to make a backup before....using PhpMyAdmin and Filezilla.

 

You have really good chances to have a smooth and fine update, with everything in order after the upgrade.

 

After the update, revert to using PHP 7.1 (no need to put shop in maintenance mode) in order to benefit from the speed and caching options PHP 7.1 offers.

 

This solution will work 100% even when someone already tried to update and received the " errorThrown:"Internal Server Error " jqXHR: " "  error.

if you change the PHP version to 5.6 and then try to update again (after the error appeared) you will succeed with the update and your problems will be solved.

 

Hope that helps some people in need.

post-27270-0-26794400-1499236133_thumb.png

post-27270-0-57457500-1499236139_thumb.png

Edited by Vitamina A (see edit history)
  • Like 1
Link to comment
Share on other sites

I've learnt over the years to avoid presta upgrades for at least a month after release as the amount of hours spent trying to fix something like this is time better spent on other things. Good work with the solution!

Link to comment
Share on other sites

  • 3 weeks later...

I guess, the 1-Click Upgrade module v 1.6.7 was released prior to PHP 7.1.0 availability, therefore wasn’t tested on that version. PHP 7.1.0 brings more strict usage of variables that way, avoiding missuses. So what works in PHP 5.4 to 5.6 doesn’t necessary works in PHP 7.1.X.
So, for those of you, whose PHP version is greater than 7.1.0 (at the time of writing, last PHP version is 7.1.7), to fix errors in this module when upgrading and restoring Prestashop version 1.6, there is a workaround:

 

Through FTP, open the file “DbQuery.php”, situated on root directory/modules/autopugrade/db/,  go to line 39 where you find ‘from’ => ‘’,
 and change it to ‘from’ => array(),
The result will be:
                protected $query = array(
                                'select' => array(),
                                'from' =>  array(),
                                'join' =>  array(),
                                'where' =>  array(),
                                'group' =>  array(),
                                'having' => array(),
                                'order' =>  array(),
                                'limit' =>  array('offset' => 0, 'limit' => 0),
                );

This is needed, because, on line 70 of the same file, the “from” variable is accessed as an array and not as string. In PHP 5.4 – 5.6, the conversion from string to array was done automatic, but in PHP 7.1, the variables must be declared strict…

 

The second workaround, is going to be on “AdminSelfUpgrade.php” file, situated on root directory/modules/autopugrade/. Open it and go to line 3035 where you will find the following structure:
$files = scandir($this->backupPath.DIRECTORY_SEPARATOR.$this->restoreName);
      foreach($files as $file)
                if (preg_match('#auto-backupdb_[0-9]{6}_'.preg_quote($this->restoreName).'#', $file))
                                                                                $this->restoreDbFilenames[] = $file;
After the line 3035, you must insert the following 2 lines:
if(!is_array($this->restoreDbFilenames))
       $this->restoreDbFilenames = array();
The result will become:
 

$files = scandir($this->backupPath.DIRECTORY_SEPARATOR.$this->restoreName);
      if(!is_array($this->restoreDbFilenames))
           $this->restoreDbFilenames = array();
      foreach($files as $file)
          if (preg_match('#auto-backupdb_[0-9]{6}_'.preg_quote($this->restoreName).'#', $file))
              $this->restoreDbFilenames[] = $file;

 

This is needed, because by no meaning, declaration is omitted in class constructor, on run time, this variable is being seen as string, instead of array.
Remember! If you change the module with this modified version, after update, check the module “1-Click Upgrade” version and if is 1.6.7, you can rollback your store to previous version without worry.

 

At the moment I wrote this solution, Prestashop 1.6 reach 1.6.1.15 version and, “1-Click Upgrade” (for Prestashop 1.6) is 1.6.7. Since the guys from Prestashop HQ are very busy developing and maintaining version 1.7, it’s hard to believe that “autoupgrade” module for Prestashop 1.6 will be updated in the future…

 

If is more simple for you, I did a copy of entyre "autoupgrade"autoupgrade_v1.6.7_mod.zip module, version 1.6.7 modified.

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