WebsiteBaker Community Forum

General Community => Global WebsiteBaker 2.8.x discussion => Topic started by: freeSbee on November 23, 2010, 09:27:00 AM

Title: Module Upgrade
Post by: freeSbee on November 23, 2010, 09:27:00 AM
Hi all

Sometimes WB fails to upgrade modules even thought the user gets an «Upgrade successfull» message. This occurs after a WB installation has been migrated to another server or restored from a backup copy.
See: https://forum.WebsiteBaker.org/index.php/topic,19855.0.html

The WB installation file uses PclZip library to extract and copy the module files to the module directory. By default a file is not extracted if a newer file with the same name already exists.
See: http://www.phpconcept.net/pclzip/user-guide/55

As result some files of the module package do not install because they are older than the corresponding files on the server.

Possible fix:
Use PclZip flag PCLZIP_OPT_REPLACE_ NEWER

Quote
By using PCLZIP_OPT_REPLACE_ NEWER, you give to PclZip the ability to extract and replace the existing file in any situation. This can be usefull in situation like restoring an backup copy of some files/folders.
See: http://www.phpconcept.net/pclzip/user-guide/42

If you think this is a WB bug that should be fixed please open a new ticket since I am not allowed to do so:
Quote
REPORT_VIEW privileges are required to perform this operation.
Thanks!

Regards Christoph
Title: Re: Module Upgrade
Post by: freeSbee on November 24, 2010, 08:00:23 PM
https://forum.WebsiteBaker.org/index.php/topic,19855.msg134886.html#msg134886
Title: Re: Module Upgrade
Post by: Luisehahne on November 25, 2010, 02:19:01 AM
Quote
PCLZIP_OPT_REPLACE_ NEWER

Might in 2.8. x version, the problem do not solve, the first step Zip file will be unzip in the temp folder and will be copied after prechecking to the module folder.

In the new 2.9.0. dev which will be available during the next days in the SVN, we are going other ways. It does not become immediately unzipping, we check the files contained in the Zip, examine info.php for valid entries. If OK, everything is extinguished within the module folder, and unzip afterwards immediately to the module folder. No detour more about temp.

Dietmar