title: Prestashop - The following module(s) were not installed properly era_widget
body: <p>I tried to use the code below to create a new module but I got an error as the same title. Please help me check!</p>
  
  <pre><code>&lt;?php
  
  if (!defined('_PS_VERSION_')) exit;
  
  include_once(_PS_MODULE_DIR_ . 'era_widget/widgetModel.php');
  
  /**
   * Description of era_widget
   *
   * @author nguye_000
   */
  class era_widget extends Module {
  
      private $_html = '';
  
      function __construct() {
  
          $this-&gt;name = 'era_widget';
          $this-&gt;tab = 'other';
          $this-&gt;version = '1.0';
          $this-&gt;author = 'Nam Nguyen';
          $this-&gt;need_instance = 0;
          $this-&gt;secure_key = Tools::encrypt($this-&gt;name);
          $this-&gt;bootstrap = true;
  
          parent::__construct();
  
          $this-&gt;displayName = $this-&gt;l('Era Widget');
          $this-&gt;description = $this-&gt;l('Display widgets for sidebar or something');
  
      }
  
      function install() {
  
          if (parent::install() &amp;&amp; $this-&gt;registerHook('displayHeader')){
              $res = $this-&gt;createTable();
              if ($res) {
                  $this-&gt;installSamples();
              }
              return $res;
          }
  
          return false;
  
      }
  
      function uninstall() {
  
          if (parent::uninstall()) {
              $res = $this-&gt;deleteTable();
              return (bool)$res;
          }
  
          return false;
  
      }
  
      function hookdisplayHeader() {
          return $this-&gt;display(__FILE__, 'frontend.tpl');
      }
  
      private function createTable() {
  
          $sql = "DROP TABLE IF EXISTS " . _DB_PREFIX_ . "`awidget`;CREATE TABLE " . _DB_PREFIX_ . "`awidget` (
                  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
                  `key` varchar(255) NOT NULL,
                  `value` longtext NOT NULL,
                  `area` text NOT NULL COMMENT 'where to contains widget',
                  `position` int(5) NOT NULL COMMENT 'order',
                  `parent` bigint(20) NOT NULL COMMENT 'wrapper is parent or not',
                  PRIMARY KEY (`id`),
                  KEY `meta_key` (`key`)
                ) ENGINE=". _MYSQL_ENGINE_ ." DEFAULT CHARSET=utf8;";
          $res = (bool) Db::getInstance()-&gt;execute($sql);
  
          return $res;
  
      }
  
      private function installSamples() {
          $sql = "insert  into ". _DB_PREFIX_ . "`awidget`(`id`,`key`,`value`,`area`,`position`,`parent`) "
                  . "values (1,'textwidget','a:2:{s:5:\"title\";s:14:\"The first text\";s:7:\"content\";s:232:\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\";}','widget-area-sample',1,0);";
          DB::getInstance()-&gt;execute($sql);
      }
  
      private function deleteTable() {
          return Db::getInstance()-&gt;execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'awidget`');
      }
  
  }
  </code></pre>
  
  <p>P/S: I'm a newbie with prestashop. I do the same homeslider module but with no success. widgetModel.php and frontend.tpl are empty files :)</p>