[Prestashop exception] After clicking Update Button #3

Closed
opened 2017-05-17 05:48:19 -05:00 by antoniobernardez · 5 comments
antoniobernardez commented 2017-05-17 05:48:19 -05:00 (Migrated from github.com)
[PrestaShopException]

Call to undefined method TbUpdaterModule\ConfigurationTest::testDir()
at line 593 in file modules/tbupdater/tbupdater.php

588. 
589.         $success = false;
590.         if (substr($file, -4) == '.zip') {
591.             if (Tools::ZipExtract($file, $tmpFolder) && file_exists($tmpFolder.DIRECTORY_SEPARATOR.$moduleName)) {
592.                 if (file_exists(_PS_MODULE_DIR_.$moduleName)) {
593.                     if (!ConfigurationTest::testDir(_PS_MODULE_DIR_.$moduleName, true, $swag, true)) {
594.                         $this->addError(sprintf($this->l('Could not update module `%s`: module directory not writable.'), $moduleName));
595. 
596.                         return false;
597.                     }
598.                     $this->recursiveDeleteOnDisk(_PS_MODULE_DIR_.$moduleName);
TbUpdater->extractModuleArchive - [line 462 - modules/tbupdater/tbupdater.php] - [3 Arguments]
TbUpdater->downloadModuleFromLocation - [line 431 - modules/tbupdater/tbupdater.php] - [2 Arguments]
TbUpdater->updateModule - [line 1525 - controllers/admin/AdminModulesController.php] - [1 Arguments]
AdminModulesControllerCore->postProcessCallback - [line 1442 - controllers/admin/AdminModulesController.php]
AdminModulesControllerCore->postProcess - [line 379 - classes/controller/Controller.php]
ControllerCore->run - [line 742 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 63 - admin/index.php]
``` [PrestaShopException] Call to undefined method TbUpdaterModule\ConfigurationTest::testDir() at line 593 in file modules/tbupdater/tbupdater.php 588. 589. $success = false; 590. if (substr($file, -4) == '.zip') { 591. if (Tools::ZipExtract($file, $tmpFolder) && file_exists($tmpFolder.DIRECTORY_SEPARATOR.$moduleName)) { 592. if (file_exists(_PS_MODULE_DIR_.$moduleName)) { 593. if (!ConfigurationTest::testDir(_PS_MODULE_DIR_.$moduleName, true, $swag, true)) { 594. $this->addError(sprintf($this->l('Could not update module `%s`: module directory not writable.'), $moduleName)); 595. 596. return false; 597. } 598. $this->recursiveDeleteOnDisk(_PS_MODULE_DIR_.$moduleName); TbUpdater->extractModuleArchive - [line 462 - modules/tbupdater/tbupdater.php] - [3 Arguments] TbUpdater->downloadModuleFromLocation - [line 431 - modules/tbupdater/tbupdater.php] - [2 Arguments] TbUpdater->updateModule - [line 1525 - controllers/admin/AdminModulesController.php] - [1 Arguments] AdminModulesControllerCore->postProcessCallback - [line 1442 - controllers/admin/AdminModulesController.php] AdminModulesControllerCore->postProcess - [line 379 - classes/controller/Controller.php] ControllerCore->run - [line 742 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 63 - admin/index.php] ```
antoniobernardez commented 2017-05-17 05:49:58 -05:00 (Migrated from github.com)

It happens too with the Theme Configurator Module.

It happens too with the Theme Configurator Module.
firstred commented 2017-05-17 06:33:22 -05:00 (Migrated from github.com)
You will have to refresh the files. It's right there: https://github.com/thirtybees/tbupdater/blob/master/classes/ConfigurationTest.php#L147
antoniobernardez commented 2017-05-17 09:25:50 -05:00 (Migrated from github.com)

The method is present in my ConfigurationTest.php file too.

The error appears always (independently of the module that I choose) when I want to update it. Is like if it's not able to recognize the ConfigurationTest class...

The method is present in my ConfigurationTest.php file too. The error appears always (independently of the module that I choose) when I want to update it. Is like if it's not able to recognize the ConfigurationTest class...
firstred commented 2017-05-18 03:15:30 -05:00 (Migrated from github.com)

The error would have been different if the ConfigurationTest class does not exist.

Maybe it is an opcache problem, but AFAIK it is being emptied after an updated. You could nonetheless try to clear the opcache. @dh42 has a nice module for it: https://dh42.com/free-prestashop-modules/prestashop-opcache-manger-module/

The error would have been different if the `ConfigurationTest` class does not exist. Maybe it is an `opcache` problem, but AFAIK it is being emptied after an updated. You could nonetheless try to clear the opcache. @dh42 has a nice module for it: https://dh42.com/free-prestashop-modules/prestashop-opcache-manger-module/
antoniobernardez commented 2017-05-18 07:36:06 -05:00 (Migrated from github.com)

[Final solution May 2017]

If you have Thirty Bees 1.0.1 version and this error happens to you. The way to fix it is to remove the module thirty bees updater from the backoffice: Uninstall -> Remove

After that, download the lastest version of the module:

https://github.com/thirtybees/tbupdater/releases/tag/1.1.3

Install it, and you will be able to update all modules again.

Regards!!

[Final solution May 2017] If you have Thirty Bees 1.0.1 version and this error happens to you. The way to fix it is to remove the module thirty bees updater from the backoffice: Uninstall -> Remove After that, download the lastest version of the module: https://github.com/thirtybees/tbupdater/releases/tag/1.1.3 Install it, and you will be able to update all modules again. Regards!!
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-thirtybees/tbupdater#3
No description provided.