Jérôme Posted June 2, 2020 Share Posted June 2, 2020 (edited) Bonjour, J'ai essayé le 1 clic upgrade que le backoffice me proposait mais maintenant je n'ai plus du tout accès à ce même backoffice et j'ai une erreur 500 à la place. Le backoffice ne semble rien charger ! qu'est ce que je peux faire ??? Edited June 2, 2020 by Jérôme (see edit history) Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 j'ai essayé de supprimer et reinstaller en ftp le module autoupgrade mais ça n'a rien changé Link to comment Share on other sites More sharing options...
PrestaServicePro Posted June 2, 2020 Share Posted June 2, 2020 Bonjour Jérôme, ouvrez le mode de débogage et partagez le résultat ici Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 Je ne peux pas mettre le mode de débogage : je ne peux pas acceder au backoffice... Est ce qu'il y a un autre moyen ? j'ai dû stopper toutes mes publicités 😛 je suis pas mal embêté ! Link to comment Share on other sites More sharing options...
PrestaServicePro Posted June 2, 2020 Share Posted June 2, 2020 folder list of ps > config > defines.inch.php you will see define('_PS_MODE_DEV_', false); change false to true and save file liste des dossiers de ps> config> define.inch.php vous verrez définir ('_ PS_MODE_DEV_', false); changer faux en vrai et enregistrer le fichier Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 je suis en mode débug : quellles sont les informations que vous voulez ? j'ai réussi à rentrer dans le backoffice Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 J'en suis là j'ai mis le site en mode maintenance Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 et c'est le drame Link to comment Share on other sites More sharing options...
PrestaServicePro Posted June 2, 2020 Share Posted June 2, 2020 Essayez de donner la permission complète de mettre en cache le dossier: var / cache puis partagez le résultat. Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 j'ai mis en 777 tous ces dossiers : Mais rien n'y fait : Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 j'ai mis tous ces dossiers en 777 mais pas de changement /home/bijouriuiz/www/var/cache/dev/smarty/compile/a9/d4/96/ Link to comment Share on other sites More sharing options...
PrestaServicePro Posted June 2, 2020 Share Posted June 2, 2020 Compris. D'accord, essayons de vider le cache. Vous pouvez essayer de supprimer class_index.php dans le dossier \ app \ cache \ dev (avec le mode dev) ou \ app \ cache \ prod Renommez également le nom du dossier "cache" actuel dans "var" puis créez. nouveau dossier "cache". Faites toutes les étapes et faites-le nous savoir. Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 désolé mais je ne vois pas le répertoire ni le fichier dont vous parlez Link to comment Share on other sites More sharing options...
PrestaServicePro Posted June 2, 2020 Share Posted June 2, 2020 Désolé, j'ai un contenu mixte. Il suffit de créer un dossier "cache" vide. Ajouter au dossier comme l'image: https://jmp.sh/HHu7RLp Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 pas de souci, merci de votre patience : j'ai ça maintnenatn Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 ah attendez le fichier n'est pas créé Link to comment Share on other sites More sharing options...
PrestaServicePro Posted June 2, 2020 Share Posted June 2, 2020 Oui <?php /** * 2007-2019 PrestaShop and Contributors * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ /** * Class PrestaShopAutoload. * * @since 1.5 */ class PrestaShopAutoload { /** * @var PrestaShopAutoload */ protected static $instance; /** * @var string Root directory */ protected $root_dir; /** * @var array array('classname' => 'path/to/override', 'classnamecore' => 'path/to/class/core') */ public $index = array(); public $_include_override_path = true; protected static $class_aliases = array( 'Collection' => 'PrestaShopCollection', 'Autoload' => 'PrestaShopAutoload', 'Backup' => 'PrestaShopBackup', 'Logger' => 'PrestaShopLogger', ); protected function __construct() { $this->root_dir = _PS_CORE_DIR_ . '/'; $file = static::getCacheFileIndex(); $stubFile = static::getStubFileIndex(); if (@filemtime($file) && is_readable($file) && @filemtime($stubFile) && is_readable($stubFile)) { $this->index = include $file; } else { $this->generateIndex(); } } /** * Get instance of autoload (singleton). * * @return PrestaShopAutoload */ public static function getInstance() { if (!static::$instance) { static::$instance = new static(); } return static::$instance; } /** * Get Class index cache file. * * @return string */ public static function getCacheFileIndex() { return _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . (_PS_MODE_DEV_ ? 'dev' : 'prod') . DIRECTORY_SEPARATOR . 'class_index.php'; } /** * Get Namespaced class stub file. * * @return string */ public static function getNamespacedStubFileIndex() { return _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . (_PS_MODE_DEV_ ? 'dev' : 'prod') . DIRECTORY_SEPARATOR . 'namespaced_class_stub.php'; } /** * Get Class stub file. * * @return string */ public static function getStubFileIndex() { return _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . (_PS_MODE_DEV_ ? 'dev' : 'prod') . DIRECTORY_SEPARATOR . 'class_stub.php'; } /** * Retrieve informations about a class in classes index and load it. * * @param string $className */ public function load($className) { // Retrocompatibility if (isset(static::$class_aliases[$className]) && !interface_exists($className, false) && !class_exists($className, false)) { return eval('class ' . $className . ' extends ' . static::$class_aliases[$className] . ' {}'); } // regenerate the class index if the requested file doesn't exists if ((isset($this->index[$className]) && $this->index[$className]['path'] && !is_file($this->root_dir . $this->index[$className]['path'])) || (isset($this->index[$className . 'Core']) && $this->index[$className . 'Core']['path'] && !is_file($this->root_dir . $this->index[$className . 'Core']['path'])) || !file_exists(static::getNamespacedStubFileIndex())) { $this->generateIndex(); } // If $classname has not core suffix (E.g. Shop, Product) if (substr($className, -4) != 'Core' && !class_exists($className, false)) { $classDir = (isset($this->index[$className]['override']) && $this->index[$className]['override'] === true) ? $this->normalizeDirectory(_PS_ROOT_DIR_) : $this->root_dir; // If requested class does not exist, load associated core class if (isset($this->index[$className]) && !$this->index[$className]['path']) { require_once $classDir . $this->index[$className . 'Core']['path']; if ($this->index[$className . 'Core']['type'] != 'interface') { eval($this->index[$className . 'Core']['type'] . ' ' . $className . ' extends ' . $className . 'Core {}'); } } else { // request a non Core Class load the associated Core class if exists if (isset($this->index[$className . 'Core'])) { require_once $this->root_dir . $this->index[$className . 'Core']['path']; } if (isset($this->index[$className])) { require_once $classDir . $this->index[$className]['path']; } } } elseif (isset($this->index[$className]['path']) && $this->index[$className]['path']) { // Call directly ProductCore, ShopCore class require_once $this->root_dir . $this->index[$className]['path']; } if (strpos($className, 'PrestaShop\PrestaShop\Adapter\Entity') !== false) { require_once static::getNamespacedStubFileIndex(); } } /** * Generate classes index. */ public function generateIndex() { if (class_exists('Configuration') && defined('_PS_CREATION_DATE_')) { $creationDate = _PS_CREATION_DATE_; if (!empty($creationDate) && Configuration::get('PS_DISABLE_OVERRIDES')) { $this->_include_override_path = false; } else { $this->_include_override_path = true; } } $coreClasses = $this->getClassesFromDir('classes/'); $classes = array_merge( $coreClasses, $this->getClassesFromDir('controllers/') ); $contentNamespacedStub = '<?php ' . "\n" . 'namespace PrestaShop\\PrestaShop\\Adapter\\Entity;' . "\n\n"; foreach ($coreClasses as $coreClassName => $coreClass) { if (substr($coreClassName, -4) == 'Core') { $coreClassName = substr($coreClassName, 0, -4); if ($coreClass['type'] != 'interface') { $contentNamespacedStub .= $coreClass['type'] . ' ' . $coreClassName . ' extends \\' . $coreClassName . ' {};' . "\n"; } } } if ($this->_include_override_path) { $coreOverrideClasses = $this->getClassesFromDir('override/classes/', defined('_PS_HOST_MODE_')); $coreClassesWOOverrides = array_diff_key($coreClasses, $coreOverrideClasses); $classes = array_merge( $classes, $coreOverrideClasses, $this->getClassesFromDir('override/controllers/', defined('_PS_HOST_MODE_')) ); } else { $coreClassesWOOverrides = $coreClasses; } $contentStub = '<?php' . "\n\n"; foreach ($coreClassesWOOverrides as $coreClassName => $coreClass) { if (substr($coreClassName, -4) == 'Core') { $coreClassNameNoCore = substr($coreClassName, 0, -4); if ($coreClass['type'] != 'interface') { $contentStub .= $coreClass['type'] . ' ' . $coreClassNameNoCore . ' extends ' . $coreClassName . ' {};' . "\n"; } } } ksort($classes); $content = '<?php return ' . var_export($classes, true) . '; ?>'; // Write classes index on disc to cache it $filename = static::getCacheFileIndex(); @mkdir(_PS_CACHE_DIR_, 0777, true); if (!$this->dumpFile($filename, $content)) { Tools::error_log('Cannot write temporary file ' . $filename); } $stubFilename = static::getStubFileIndex(); if (!$this->dumpFile($stubFilename, $contentStub)) { Tools::error_log('Cannot write temporary file ' . $stubFilename); } $namespacedStubFilename = static::getNamespacedStubFileIndex(); if (!$this->dumpFile($namespacedStubFilename, $contentNamespacedStub)) { Tools::error_log('Cannot write temporary file ' . $namespacedStubFilename); } $this->index = $classes; } /** * @param string $filename * @param string $content * * @return bool * * @see http://api.symfony.com/3.0/Symfony/Component/Filesystem/Filesystem.html#method_dumpFile */ public function dumpFile($filename, $content) { $dir = dirname($filename); // Will create a temp file with 0600 access rights // when the filesystem supports chmod. $tmpFile = tempnam($dir, basename($filename)); if (false === @file_put_contents($tmpFile, $content)) { return false; } // Ignore for filesystems that do not support umask @chmod($tmpFile, file_exists($filename) ? fileperms($filename) : 0666 & ~umask()); rename($tmpFile, $filename); return true; } /** * Retrieve recursively all classes in a directory and its subdirectories. * * @param string $path Relative path from root to the directory * @param bool $hostMode Since 1.7, deprecated. * * @return array */ protected function getClassesFromDir($path, $hostMode = false) { $classes = array(); $rootDir = $hostMode ? $this->normalizeDirectory(_PS_ROOT_DIR_) : $this->root_dir; foreach (scandir($rootDir . $path, SCANDIR_SORT_NONE) as $file) { if ($file[0] != '.') { if (is_dir($rootDir . $path . $file)) { $classes = array_merge($classes, $this->getClassesFromDir($path . $file . '/', $hostMode)); } elseif (substr($file, -4) == '.php') { $content = file_get_contents($rootDir . $path . $file); $namespacePattern = '[\\a-z0-9_]*[\\]'; $pattern = '#\W((abstract\s+)?class|interface)\s+(?P<classname>' . basename($file, '.php') . '(?:Core)?)' . '(?:\s+extends\s+' . $namespacePattern . '[a-z][a-z0-9_]*)?(?:\s+implements\s+' . $namespacePattern . '[a-z][\\a-z0-9_]*(?:\s*,\s*' . $namespacePattern . '[a-z][\\a-z0-9_]*)*)?\s*\{#i'; //DONT LOAD CLASS WITH NAMESPACE - PSR4 autoloaded from composer $usesNamespace = false; foreach (token_get_all($content) as $token) { if ($token[0] === T_NAMESPACE) { $usesNamespace = true; break; } } if (!$usesNamespace && preg_match($pattern, $content, $m)) { $classes[$m['classname']] = array( 'path' => $path . $file, 'type' => trim($m[1]), 'override' => $hostMode, ); if (substr($m['classname'], -4) == 'Core') { $classes[substr($m['classname'], 0, -4)] = array( 'path' => '', 'type' => $classes[$m['classname']]['type'], 'override' => $hostMode, ); } } } } } return $classes; } /** * Get Class path. * * @param string $classname */ public function getClassPath($classname) { return (isset($this->index[$classname]['path'])) ? $this->index[$classname]['path'] : null; } /** * Normalize directory. * * @param string $directory * * @return string */ private function normalizeDirectory($directory) { return rtrim($directory, '/\\') . DIRECTORY_SEPARATOR; } } spl_autoload_register(array(PrestaShopAutoload::getInstance(), 'load')); Link to comment Share on other sites More sharing options...
PrestaServicePro Posted June 2, 2020 Share Posted June 2, 2020 Si "PrestaShopAutoload.php" n'existe pas dans le dossier "classes", créez-le et patez le code de ce fichier. Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 où doit se trouver ce fichier ? dans quel repertoire ? Link to comment Share on other sites More sharing options...
PrestaServicePro Posted June 2, 2020 Share Posted June 2, 2020 PrestaShop root / classes Link to comment Share on other sites More sharing options...
Jérôme Posted June 2, 2020 Author Share Posted June 2, 2020 OK visiblement c'est ce fichier "cache" qui posait problème, j'en ai re-créé un comme vous me l'indiquiez et ça refonctionne correctement, merci beaucoup pour votre patience et votre aide ! Link to comment Share on other sites More sharing options...
PrestaServicePro Posted June 2, 2020 Share Posted June 2, 2020 Toutes nos félicitations! Veuillez marquer le message comme résolu Bonne journée Link to comment Share on other sites More sharing options...
Jérôme Posted June 3, 2020 Author Share Posted June 3, 2020 Par contre, la mise a jour n'est pas faite : je suis toujours sur 1.7.5.1 ! Link to comment Share on other sites More sharing options...
PrestaServicePro Posted June 3, 2020 Share Posted June 3, 2020 Je vous ai compris et si vous avez besoin d'aide concernant la mise à niveau, nous pouvons gérer votre processus de migration à partir de zéro. Link to comment Share on other sites More sharing options...
Jérôme Posted June 3, 2020 Author Share Posted June 3, 2020 avec plaisir ! Dites moi ce que je dois faire Link to comment Share on other sites More sharing options...
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