Bonjour,
Merci de prendre le temps de m’aider. A un moment ou un autre, cette erreur aurait effectivement pointée le bout de son nez.
Hélas, ce n’est pas cela. C’est vraiment comme si il ne chargeait même pas mon fichier « actions_priceTag.class.php ». Même si je met « die(« toto »); » avant ou après le if(!error), rien ne se passe. C’est la même chose si j’essaie un die(« toto ») dans le constructeur.
Au cas où, je met le code de mon modpriceTag.class.php:
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* Description and activation class for module PriceTag
*/
class modPriceTag extends DolibarrModules
{
/**
* Constructor. Define names, constants, directories, boxes, permissions
*
* @param DoliDB $db Database handler
*/
public function __construct($db)
{
global $langs,$conf;
$this->db = $db;
// Id for module (must be unique).
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
$this->numero = 500000; // TODO Go on page http://wiki.dolibarr.org/index.php/List_of_modules_id to reserve id number for your module
// Key text used to identify module (for permissions, menus, etc...)
$this->rights_class = 'priceTag';
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
$this->family = "other";
// Gives the possibility to the module, to provide his own family info and position of this family. (canceled $this->family)
$this->familyinfo = array('E-concept' => array('position' => '001', 'label' => $langs->trans("E-concept modules")));
// Module position in the family
$this->module_position = 500;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
$this->description = "This module should allow user to print price tag from product detail page";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
$this->version = '1.0';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 0;
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
$this->picto='priceTag@priceTag';
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
$this->module_parts = array('hooks' => array('productcard'));
// Data directories to create when module is enabled.
// Example: this->dirs = array("/priceTag/temp");
$this->dirs = array();
// Config pages. Put here list of php page, stored into priceTag/admin directory, to use to setup module.
$this->config_page_url = array("");
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->conflictwith = array(); // List of modules id this module is in conflict with
$this->phpmin = array(5,0); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
$this->langfiles = array("mylangfile@priceTag");
// Constants
$this->const = array();
$this->tabs = array();
// Dictionaries
if (! isset($conf->priceTag->enabled))
{
$conf->priceTag=new stdClass();
$conf->priceTag->enabled=0;
}
$this->dictionaries=array();
// Boxes
// Add here list of php file(s) stored in core/boxes that contains class to show a box.
$this->boxes = array(); // List of boxes
// Cronjobs
$this->cronjobs = array(); // List of cron jobs entries to add
$this->rights = array(); // Permission array used by this module
$r=0;
// Main menu entries
$this->menu = array(); // List of menus to add
}
/**
* Function called when module is enabled.
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
* It also creates data directories
*
* @param string $options Options when enabling module ('', 'noboxes')
* @return int 1 if OK, 0 if KO
*/
public function init($options='')
{
$sql = array();
//$this->_load_tables('/priceTag/sql/');
return $this->_init($sql, $options);
}
/**
* Function called when module is disabled.
* Remove from database constants, boxes and permissions from Dolibarr database.
* Data directories are not deleted
*
* @param string $options Options when enabling module ('', 'noboxes')
* @return int 1 if OK, 0 if KO
*/
public function remove($options = '')
{
$sql = array();
return $this->_remove($sql, $options);
}
}