Author Topic: Module Upgrade  (Read 2292 times)

Offline freeSbee

  • Posts: 1117
    • BAKERY - Website Baker shop module
Module Upgrade
« 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: http://www.websitebaker2.org/forum/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

Offline freeSbee

  • Posts: 1117
    • BAKERY - Website Baker shop module

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4359
  • Gender: Male
    • Webdesign und Entwicklung WebsiteBaker
Re: Module Upgrade
« Reply #2 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
Immer nur von der Zukunft reden, die Gegenwart vergessen und auf die Vergangenheit schimpfen
Neues Unwort: Schnappatmung

 

postern-length