Jump to content

Page Blanche du site - Mode Debug activé


Recommended Posts

Bonjour,

Je suis en version de Prestashop 1.7.7.0 hébergé par OVH, j'ai actuellement un problème de page blanche uniquement sur le site.

Le mode DEBUG est donc activé pour voir l'erreur.

J'ai cela:
 

Quote

 

(1/1) FatalThrowableError

Parse error: syntax error, unexpected 'PrestaShop' (T_STRING)

in postestimonials.php line 1

at ModuleCore::coreLoadModule('postestimonials')in Module.php line 1141

at ModuleCore::getInstanceByName('postestimonials')in Hook.php line 902

at HookCore::exec('displayHeader')in FrontController.php line 575

at FrontControllerCore->initContent()in IndexController.php line 37

at IndexControllerCore->initContent()in Controller.php line 306

at ControllerCore->run()in Dispatcher.php line 518

at DispatcherCore->dispatch()in index.php line 28

 

J'ai l'impression que le problème vient d'un module du thème. Auriez vous une idée ?

Merci d'avance

Link to comment
Share on other sites

J'ai ceci dans ce fichier :

Quote

 

<?phpuse PrestaShop\PrestaShop\Core\Module\WidgetInterface;
if (!defined('_PS_VERSION_'))
    exit;

// Loading Models
include_once(_PS_MODULE_DIR_ . 'postestimonials/libs/Params.php');
include_once(_PS_MODULE_DIR_ . 'postestimonials/classes/PosTestimonial.php');
class Postestimonials extends Module implements WidgetInterface
{
   private $_html = '';
   protected $params = null;
   const INSTALL_SQL_FILE = 'install.sql';
   const UNINSTALL_SQL_FILE = 'uninstall.sql';
   public function __construct()
        {
            $this->name ='postestimonials';
            $this->version = '1.6';
            $this->author = 'posthemes';
            $this->bootstrap = true;
            $this->tab = 'front_office_features';
            $this->need_instance = 0;
            $this->ps_versions_compliancy = [
                'min' => '1.7',
                'max' => _PS_VERSION_,
            ];
            parent::__construct();
            $this->displayName = $this->l('Pos Testimonials ');
            $this->description = $this->l('Module manager Testimonials');
            $this->_searched_email = null;
            $this->confirmUninstall = $this->l('Are you sure you want to uninstall?');
            $this->_params = new Params($this->name, $this);            $this->templateFile = 'module:postestimonials/views/templates/front/testimonials_random.tpl';
        }

    public function initConfigs()
        {
            return array(
                'test_limit' => 10,
                'type_image' => 'png|jpg|gif',
                'type_video' => 'flv|mp4|avi',
                'size_limit' => 6,
                'captcha' => 0,
                'auto_post' => 1,
            );
        }

    public function install()
    {
        if (parent::install() && $this->registerHook('displayFullbottom') && $this->registerHook('displayHeader')) {

            $res = $this->installDb();
            if(!(int)Tab::getIdFromClassName('AdminPosMenu')) {
                $parent_tab = new Tab();
                // Need a foreach for the language
                $parent_tab->name[$this->context->language->id] = $this->l('PosExtentions');
                $parent_tab->class_name = 'AdminPosMenu';
                $parent_tab->id_parent = 0; // Home tab
                $parent_tab->module = $this->name;
                $parent_tab->add();
            }
            $tab = new Tab();
            // Need a foreach for the language
            foreach (Language::getLanguages() as $language)
                $tab->name[$language['id_lang']] = $this->l('Manage Testimonials');
            $tab->class_name = 'AdminTestimonials';
            $tab->id_parent = (int)Tab::getIdFromClassName('AdminPosMenu');
            $tab->module = $this->name;
            $tab->add();
            $configs = $this->initConfigs();
            $this->_params->batchUpdate($configs);
            $this->installSampleData();
            return (bool)$res;
        }
        return false;
    }    public function uninstall()
    {
        if (parent::uninstall()) {
            $res = $this->uninstallDb();
            $tab = new Tab((int) Tab::getIdFromClassName('AdminTestimonials'));
            $tab->delete();
          //  $res &= $this->uninstallModuleTab('AdminPosMenu');
            return (bool)$res;
        }
        return false;
    }
    
        private function installSampleData(){
        $languages = Language::getLanguages(false);
        Db::getInstance()->execute('
            INSERT INTO `'._DB_PREFIX_.'postestimonial` (`id_postestimonial`,`email`,`media`,`media_type`,`active`,`position`)  VALUES ("1","[email protected]","sample1.png","png","1","1");
            INSERT INTO `'._DB_PREFIX_.'postestimonial` (`id_postestimonial`,`email`,`media`,`media_type`,`active`,`position`)  VALUES ("2","[email protected]","sample2.png","png","1","2");
            INSERT INTO `'._DB_PREFIX_.'postestimonial` (`id_postestimonial`,`email`,`media`,`media_type`,`active`,`position`)  VALUES ("3","[email protected]","sample3.png","png","1","3");            
            INSERT INTO `'._DB_PREFIX_.'postestimonial` (`id_postestimonial`,`email`,`media`,`media_type`,`active`,`position`)  VALUES ("4","[email protected]","sample4.png","png","1","4")');
        foreach($languages as $lang){
            Db::getInstance()->execute('
                INSERT INTO `'._DB_PREFIX_.'postestimonial_lang` (`id_postestimonial`,`id_lang`,`name_post`,`address`,`content`)  VALUES ("1",'.$lang['id_lang'].',"John  Doe "," No 40 Baria Sreet 133/2, NewYork, USA.","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril ");
                INSERT INTO `'._DB_PREFIX_.'postestimonial_lang` (`id_postestimonial`,`id_lang`,`name_post`,`address`,`content`)  VALUES ("2",'.$lang['id_lang'].',"John  Doe "," No 40 Baria Sreet 133/2, NewYork, USA.","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril");
                INSERT INTO `'._DB_PREFIX_.'postestimonial_lang` (`id_postestimonial`,`id_lang`,`name_post`,`address`,`content`)  VALUES ("3",'.$lang['id_lang'].',"John  Doe "," No 40 Baria Sreet 133/2, NewYork, USA.","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril ");
                INSERT INTO `'._DB_PREFIX_.'postestimonial_lang` (`id_postestimonial`,`id_lang`,`name_post`,`address`,`content`)  VALUES ("4",'.$lang['id_lang'].',"John  Doe "," No 40 Baria Sreet 133/2, NewYork, USA.","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril ")');
                
 

 

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...