Erreur lors de l'administration des modules [Réglé]
tonysreturn Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre tonysreturn
- Inscrit le : 17/04/2013
Ci-dessus erreur qui ressort lorsque je suis dans l'administration des modules et que je clique sur "modifier"
Pourriez-vous m'aider, je viens d'installer PHPBoost et c'est la seule erreur que je ressort et pour laquelle je n'ai pas trouver la solution sur votre support.
Merci
ReidLos Membre non connecté
-
Modérateur
- Voir le profil du membre ReidLos
- Inscrit le : 27/02/2009
- Site internet
- Groupes :
-
Equipe Développement
En effet, c'est un problème qui va être corrigé dans la version 4.0.4.
En attendant tu peux remplacer le fichier /admin/modules/controllers/AdminModulesManagementController.class.php par le contenu suivant :
Code PHP :
<?php /*################################################## * AdminModulesManagementController.class.php * ------------------- * begin : September 20, 2011 * copyright : (C) 2011 Patrick DUBEAU * email : daaxwizeman@gmail.com * * ################################################### * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ class AdminModulesManagementController extends AdminController { private $lang; private $view; public function execute(HTTPRequestCustom $request) { $this->init(); $this->build_view(); $this->save($request); return new AdminModulesDisplayResponse($this->view, $this->lang['modules.module_management']); } private function init() { $this->load_lang(); $this->view = new FileTemplate('admin/modules/AdminModulesManagementController.tpl'); $this->view->add_lang($this->lang); } private function load_lang() { $this->lang = LangLoader::get('admin-modules-common'); } private function build_view() { $modules_activated = ModulesManager::get_activated_modules_map_sorted_by_localized_name(); $modules_installed = ModulesManager::get_installed_modules_map_sorted_by_localized_name(); foreach ($modules_installed as $module) { $configuration = $module->get_configuration(); $array_auth = $module->get_authorizations(); $author = $configuration->get_author(); $author_email = $configuration->get_author_email(); $author_website = $configuration->get_author_website(); if (!in_array($module, $modules_activated)) { $this->view->assign_block_vars('modules_not_activated', array( 'ID' => $module->get_id(), 'NAME' => ucfirst($configuration->get_name()), 'ICON' => $module->get_id(), 'VERSION' => $configuration->get_version(), 'AUTHOR' => !empty($author) ? '<a href="mailto:' . $author_email. '">' . $author . '</a>' : $author, 'AUTHOR_WEBSITE' => !empty($author_website) ? '<a href="' . $author_website . '"><img src="' . TPL_PATH_TO_ROOT . '/templates/' . get_utheme() . '/images/' . get_ulang() . '/user_web.png" alt="" /></a>' : '', 'DESCRIPTION' => $configuration->get_description(), 'COMPATIBILITY' => $configuration->get_compatibility(), 'PHP_VERSION' => $configuration->get_php_version(), 'C_MODULE_ACTIVE' => $module->is_activated(), 'AUTHORIZATIONS' => Authorizations::generate_select(Module::ACCESS_AUTHORIZATION, $array_auth, array(2 => true), $module->get_id()), 'U_DELETE_LINK' => AdminModulesUrlBuilder::delete_module($module->get_id())->absolute() )); } else { $this->view->assign_block_vars('modules_activated', array( 'ID' => $module->get_id(), 'NAME' => ucfirst($configuration->get_name()), 'ICON' => $module->get_id(), 'VERSION' => $module->get_installed_version(), 'AUTHOR' => !empty($author) ? '<a href="mailto:' . $author_email. '">' . $author . '</a>' : $author, 'AUTHOR_WEBSITE' => !empty($author_website) ? '<a href="' . $author_website . '"><img src="' . TPL_PATH_TO_ROOT . '/templates/' . get_utheme() . '/images/' . get_ulang() . '/user_web.png" alt="" /></a>' : '', 'DESCRIPTION' => $configuration->get_description(), 'COMPATIBILITY' => $configuration->get_compatibility(), 'PHP_VERSION' => $configuration->get_php_version(), 'C_MODULE_ACTIVE' => $module->is_activated(), 'AUTHORIZATIONS' => Authorizations::generate_select(Module::ACCESS_AUTHORIZATION, $array_auth, array(2 => true), $module->get_id()), 'U_DELETE_LINK' => AdminModulesUrlBuilder::delete_module($module->get_id())->absolute() )); } } $this->view->put_all(array( 'C_MODULES_ACTIVATED' => count($modules_activated) > 0 ? true : false, 'C_MODULES_NOT_ACTIVATED' => (count($modules_installed) - count($modules_activated)) > 0 ? true : false )); } private function save(HTTPRequestCustom $request) { if ($request->get_bool('update', false)) { $errors = array(); foreach (ModulesManager::get_installed_modules_map() as $module) { $request = AppContext::get_request(); $module_id = $module->get_id(); $activated = $request->get_bool('activated-' . $module_id, false); $authorizations = Authorizations::auth_array_simple(Module::ACCESS_AUTHORIZATION, $module_id); $error = ModulesManager::update_module_authorizations($module_id, $activated, $authorizations); if (!empty($error)) $errors[$module->get_configuration()->get_name()] = $error; } if (empty($errors)) { AppContext::get_response()->redirect(AdminModulesUrlBuilder::list_installed_modules()); } else { foreach ($errors as $module_name => $error) { $this->view->assign_block_vars('errors', array( 'MSG' => MessageHelper::display($module_name . ' : ' . $error, MessageHelper::WARNING, 10) )); } } } } } ?>
ReidLos
tonysreturn Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre tonysreturn
- Inscrit le : 17/04/2013
tonysreturn Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre tonysreturn
- Inscrit le : 17/04/2013
Citation :
$author = $configuration->get_author();
L'erreur qu'il me sort est
Citation :
Fatal error: Call to undefined method ModuleConfiguration::get_author() in /homez.646/essaiper/www/cegid/admin/modules/controllers/AdminModulesManagementController.class.php on line 63
Édité par tonysreturn Le 17/04/2013 à 16h06
j1.seth Membre non connecté
-
Administrateur
- Voir le profil du membre j1.seth
- Inscrit le : 01/09/2008
- Site internet
- Groupes :
-
Chef de Projet
-
Equipe Développement
Code PHP :
<?php /*################################################## /** * ModuleConfiguration.class.php * ------------------- * begin : December 12, 2009 * copyright : (C) 2009 Loic Rouchon * email : loic.rouchon@phpboost.com * * *################################################### * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * *################################################### */ /** * @author Loic Rouchon <loic.rouchon@phpboost.com> * @package {@package} */ class ModuleConfiguration { private $name; private $description; private $author; private $author_email; private $author_website; private $version; private $date; private $compatibility; private $php_version; private $repository; private $admin_main_page; private $admin_menu; private $admin_links; private $home_page; private $contribution_interface; private $url_rewrite_rules; public function __construct($config_ini_file, $desc_ini_file) { $this->load_configuration($config_ini_file); $this->load_description($desc_ini_file); } public function get_name() { return $this->name; } public function get_description() { return $this->description; } public function get_author() { return $this->author; } public function get_author_email() { return $this->author_email; } public function get_author_website() { return $this->author_website; } public function get_version() { return $this->version; } public function get_date() { return $this->date; } public function get_compatibility() { return $this->compatibility; } public function get_php_version() { return $this->php_version; } public function get_repository() { return $this->repository; } public function get_admin_main_page() { return $this->admin_main_page; } public function get_admin_menu() { return $this->admin_menu; } public function get_admin_links() { return $this->admin_links; } public function get_home_page() { return $this->home_page; } public function get_contribution_interface() { return $this->contribution_interface; } public function get_mini_modules() { return $this->mini_modules; } public function get_url_rewrite_rules() { return $this->url_rewrite_rules; } private function load_configuration($config_ini_file) { $config = parse_ini_file($config_ini_file); $this->check_parse_ini_file($config, $config_ini_file); $this->author = $config['author']; $this->author_email = $config['author_mail']; $this->author_website = $config['author_website']; $this->version = $config['version']; $this->date = $config['date']; $this->compatibility = $config['compatibility']; $this->php_version = !empty($config['php_version']) ? $config['php_version'] : '5.1.2'; $this->repository = !empty($config['repository']) ? $config['repository'] : Updates::PHPBOOST_OFFICIAL_REPOSITORY; $this->admin_main_page = !empty($config['admin_main_page']) ? $config['admin_main_page'] : ''; $this->admin_menu = !empty($config['admin_menu']) ? $config['admin_menu'] : ''; $this->home_page = !empty($config['home_page']) ? $config['home_page'] : ''; $this->contribution_interface = !empty($config['contribution_interface']) ? $config['contribution_interface'] : ''; $this->url_rewrite_rules = !empty($config['rewrite_rules']) ? $config['rewrite_rules'] : array(); } private function load_description($desc_ini_file) { $desc = @parse_ini_file($desc_ini_file); $this->check_parse_ini_file($desc, $desc_ini_file); $this->name = $desc['name']; $this->description = $desc['desc']; $this->admin_links = !empty($desc['admin_links']) ? self::parse_ini_array($desc['admin_links']) : array(); } private function check_parse_ini_file($parse_result, $ini_file) { if ($parse_result === false) { throw new IOException('Parse ini file ' . $ini_file . ' failed'); } } /** * @desc Parses a table written in a special syntax which is user-friendly and can be inserted in a ini file (PHP serialized arrays cannot be inserted because they contain the " character). * The syntax is very easy, it really looks like the PHP array declaration: key => value, key2 => value2 * You can nest some elements: key => (key1 => value1, key2 => value2), key2 => value2 * @param string $links_format Serialized array * @return string[] The unserialized array. */ public static function parse_ini_array($links_format) { // TODO remove the public visibility when migration to new config files will be done $links_format = preg_replace('` ?=> ?`', '=', $links_format); $links_format = preg_replace(' ?, ?', ',', $links_format) . ' '; list($key, $value, $open, $cursor, $check_value, $admin_links) = array('', '', '', 0, false, array()); $string_length = strlen($links_format); while ($cursor < $string_length) //Parcours linéaire. { $char = substr($links_format, $cursor, 1); if (!$check_value) //On récupère la clé. { if ($char != '=') { $key .= $char; } else { $check_value = true; } } else //On récupère la valeur associé à la clé, une fois celle-ci récupérée. { if ($char == '(') //On marque l'ouverture de la parenthèse. { $open = $key; } if ($char != ',' && $char != '(' && $char != ')' && ($cursor+1) < $string_length) //Si ce n'est pas un caractère délimiteur, on la fin => on concatène. { $value .= $char; } else { if (!empty($open) && !empty($value)) //On insère dans la clé marqué précédemment à l'ouveture de la parenthèse. { $admin_links[$open][$key] = $value; } else { $admin_links[$key] = $value; //Ajout simple. } list($key, $value, $check_value) = array('', '', false); } if ($char == ')') { $open = ''; //On supprime le marqueur. $cursor++; //On avance le curseur pour faire sauter la virugle après la parenthèse. } } $cursor++; } return $admin_links; } } ?>
Ca a été corrigé pour la version 4.0.4
julienseth78
tonysreturn Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre tonysreturn
- Inscrit le : 17/04/2013
Merci beaucoup
micka260 Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre micka260
- Inscrit le : 17/04/2013
micka260 Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre micka260
- Inscrit le : 17/04/2013
FleuryK Membre non connecté
Booster Fuzil
-
Booster Fuzil
- Voir le profil du membre FleuryK
- Inscrit le : 18/04/2013
- Site internet
- Groupes :
Cette fois ci, c'est quand je veux ajouter un module, une erreur fatale de php s'affiche :
Fatal error: Call to undefined method ModuleConfiguration::get_authors_website() in /home/a5250531/public_html/admin/modules/controllers/AdminModuleAddController.class.php on line 98
Pourtant j'ai bien suivi le "tuto" et ça recoince. Une soluce ?
Édité par FleuryK Le 22/04/2013 à 10h25
ElenWii Membre non connecté
-
Administrateur
- Voir le profil du membre ElenWii
- Inscrit le : 14/08/2009
- Site internet
- Groupes :
-
Equipe Graphique
Peux-tu préciser le module que tu souhaite ajouté ? (cela fonctionne t'il avec un module officiel ?)
Quel méthode utilise tu ? Import zip ou copie par FTP ?
ElenWii
FleuryK Membre non connecté
Booster Fuzil
-
Booster Fuzil
- Voir le profil du membre FleuryK
- Inscrit le : 18/04/2013
- Site internet
- Groupes :
ElenWii Membre non connecté
-
Administrateur
- Voir le profil du membre ElenWii
- Inscrit le : 14/08/2009
- Site internet
- Groupes :
-
Equipe Graphique
ElenWii
j1.seth Membre non connecté
-
Administrateur
- Voir le profil du membre j1.seth
- Inscrit le : 01/09/2008
- Site internet
- Groupes :
-
Chef de Projet
-
Equipe Développement
Le problème a été corrigé dans la 4.0.4
Elle sort ce soir, encore un peu de patience...
julienseth78
babsolune Membre non connecté
-
Administrateur
- Voir le profil du membre babsolune
- Inscrit le : 16/05/2008
- Site internet
- Groupes :
-
Equipe Développement
riptide Membre non connecté
Booster Roquette
-
Booster Roquette
- Voir le profil du membre riptide
- Inscrit le : 29/02/2012
- Site internet
- Groupes :
J'ai remplacer les fichiers comme dis, et j'ai plus de site j'ai ça:
Fatal error: ExtensionPointProviderService::load_modules_providers() [<a href='extensionpointproviderservice.load-modules-providers'>extensionpointproviderservice.load-modules-providers</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Module" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /homez.337/arfoooan/www/aaa-tchatt/kernel/framework/phpboost/extension-provider/ExtensionPointProviderService.class.php on line 165
Une autre chose pour l'isncription des membres le code capchat n'est jamais bon même si marque le bon je sais pas d'ou ça viens si c'est lié à ça ou pas..
Alors j'ai upload ma sauvegarde ftp et vider le cach en attendant la sortie de la v4.0.4
Édité par riptide Le 01/05/2013 à 21h04
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie
