cprats Posted August 29, 2019 Posted August 29, 2019 Hi, I get this error 500 when I try to uninstall PayPal module (module version 5.4.2, thirtybees version 1.0.8): ## ThirtyBeesException **[] is not a valid configuration key** *at line* **1005** *in file* `classes/Configuration.php` ```php 1000. * @since 1.0.8 1001. */ 1002. protected static function validateKey($key) 1003. { 1004. if ( ! Validate::isConfigName($key)) { 1005. => $e = new PrestaShopException(sprintf( 1006. Tools::displayError('[%s] is not a valid configuration key'), 1007. Tools::htmlentitiesUTF8($key) 1008. )); 1009. die($e->displayMessage()); 1010. } ``` - **ConfigurationCore::validateKey** - [line `813` - `classes/Configuration.php`] - [1 Arguments] ```php 808. * @throws PrestaShopException 809. * @throws PrestaShopDatabaseException 810. */ 811. public static function deleteByName($key) 812. { 813. => static::validateKey($key); 814. 815. $result = Db::getInstance()->execute( 816. ' 817. DELETE FROM `'._DB_PREFIX_.static::$definition['table'].'_lang` 818. WHERE `'.static::$definition['primary'].'` IN ( ``` ```Argument [0] ``` - **ConfigurationCore::deleteByName** - [line `292` - `modules/paypal/paypal.php`] - [1 Arguments] ```php 287. public function deleteConfiguration() 288. { 289. \Configuration::deleteByName(static::LIVE); 290. 291. \Configuration::deleteByName(static::IMMEDIATE_CAPTURE); 292. => \Configuration::deleteByName(static::DEBUG_MODE); 293. \Configuration::deleteByName(static::STORE_COUNTRY); 294. 295. \Configuration::deleteByName(static::LOGIN_ENABLED); 296. \Configuration::deleteByName(static::CLIENT_ID); 297. \Configuration::deleteByName(static::SECRET); ``` ```Argument [0] ``` - **PayPal->deleteConfiguration** - [line `275` - `modules/paypal/paypal.php`] ```php 270. * 271. * @return bool Indicates whether the module was uninstalled successfully 272. */ 273. public function uninstall() 274. { 275. => $this->deleteConfiguration(); 276. 277. return parent::uninstall(); 278. } 279. 280. /** ``` - **PayPal->uninstall** - [line `1648` - `controllers/admin/AdminModulesController.php`] ```php 1643. } 1644. if (count($this->errors)) { 1645. continue; 1646. } 1647. // Get the return value of current method 1648. => $echo = $module->{$method}(); 1649. // After a successful install of a single module that has a configuration method, to the configuration page 1650. if ($key == 'install' && $echo === true && strpos(Tools::getValue('install'), '|') === false && method_exists($module, 'getContent')) { 1651. Tools::redirectAdmin(static::$currentIndex.'&token='.$this->token.'&configure='.$module->name.'&conf=12'); 1652. } 1653. } ``` - **AdminModulesControllerCore->postProcessCallback** - [line `1511` - `controllers/admin/AdminModulesController.php`] ```php 1506. } 1507. } 1508. 1509. // Call appropriate module callback 1510. if (!isset($ppmReturn)) { 1511. => $this->postProcessCallback(); 1512. } 1513. 1514. if ($back = Tools::getValue('back')) { 1515. Tools::redirectAdmin($back); 1516. } ``` - **AdminModulesControllerCore->postProcess** - [line `251` - `classes/controller/Controller.php`] ```php 246. if ($this->checkAccess()) { 247. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 248. $this->setMedia(); 249. } 250. 251. => $this->postProcess(); 252. 253. if (!empty($this->redirect_after)) { 254. $this->redirect(); 255. } 256. ``` - **ControllerCore->run** - [line `837` - `classes/Dispatcher.php`] ```php 832. if (isset($paramsHookActionDispatcher)) { 833. Hook::exec('actionDispatcher', $paramsHookActionDispatcher); 834. } 835. 836. // Running controller 837. => $controller->run(); 838. } catch (PrestaShopException $e) { 839. $e->displayMessage(); 840. } 841. } 842. ``` - **DispatcherCore->dispatch** - [line `63` - `admin/index.php`] ```php 58. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) { 59. $_REQUEST['controller'] = strtolower($_REQUEST['tab']); 60. } 61. 62. // Prepare and trigger admin dispatcher 63. => Dispatcher::getInstance()->dispatch();
Occam Posted August 29, 2019 Posted August 29, 2019 Seems to refer to a non-existent configuration field in the database. I guess it would help to delete the waste line Configuration::deleteByName(static::DEBUG_MODE); In function deleteConfiguration() of your paypal.php. 2
Occam Posted August 29, 2019 Posted August 29, 2019 I wouldn't think it's a matter of the PHP version but a known issue for releases elder than thirty bees Paypal 6.0. The const DEBUG_MODE = 'PAYPAL_DEBUG' was not defined. 2
cprats Posted August 30, 2019 Author Posted August 30, 2019 On 8/29/2019 at 10:31 AM, musicmaster said: What is your php version? It is 7.1
cprats Posted August 30, 2019 Author Posted August 30, 2019 On 8/29/2019 at 9:56 AM, Occam said: Seems to refer to a non-existent configuration field in the database. I guess it would help to delete the waste line Configuration::deleteByName(static::DEBUG_MODE); In function deleteConfiguration() of your paypal.php. Yes, this was the issue. After making the changes you suggested I could uninstall the module. Thank-you very much!
yaniv14 Posted August 31, 2019 Posted August 31, 2019 This bug was fixes in this commit https://github.com/thirtybees/paypal/commit/5b92e8709f057c7683244ca98434b958242afd2d But no newer version released after that commit. @Traumflug 2
datakick Posted September 2, 2019 Posted September 2, 2019 That's because this commit was to master branch, which corresponds to version 6.0.0. That version was released for a brief period of time only, as many people had issues with it. Since that time there was some development on 5.x.x branch, and couple of 5.x.x version releases. Unfortunately this branch still has the issue mentioned in this thread. I don't know if there are any plans to revive 6.0.0 work and fix it, or if the plan is to continue development in 5.x.x branch. That's up to thirtybees developers to decide. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now