fixxer1 Posted July 19, 2023 Share Posted July 19, 2023 (edited) Hello respected experts. Prestashop 8.0.4 After I've changed my current custom theme to classic, entire backoffice along with the front crashed. Please help to solve this, I only need to get back to my custom theme. Here is what the log says: [19-Jul-2023 10:25:38 UTC] PHP Fatal error: Uncaught Symfony\Component\Yaml\Exception\ParseException: Unable to parse at line 63 (near " modules_to_hook:"). in /home/zegyntblo26o/public_html/cstms_store/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php:493 Stack trace: #0 /home/zegyntblo26o/public_html/cstms_store/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php(533): Symfony\Component\Yaml\Parser->doParse() #1 /home/zegyntblo26o/public_html/cstms_store/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php(329): Symfony\Component\Yaml\Parser->parseBlock() #2 /home/zegyntblo26o/public_html/cstms_store/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php(96): Symfony\Component\Yaml\Parser->doParse() #3 /home/zegyntblo26o/public_html/cstms_store/src/Core/Addon/Theme/ThemeRepository.php(167): Symfony\Component\Yaml\Parser->parse() #4 /home/zegyntblo26o/public_html/cstms_store/src/Core/Addon/Theme/ThemeRepository.php(85): PrestaShop\PrestaShop\Core\Addon\Theme\ThemeRepository->getConfigFromFile() #5 /home/zegyntblo26o/public_html/cstms_store/classes/shop/Shop.php(504): PrestaShop\PrestaShop\Core\Addon\Theme\ThemeRepository->getInstanceByName() #6 /home/zegyntblo26o/public_html/cstms_store/classes/shop/Shop.php(147): ShopCore->setTheme() #7 /home/zegyntblo26o/public_html/cstms_store/classes/shop/Shop.php(425): ShopCore->__construct() #8 /home/zegyntblo26o/public_html/cstms_store/config/config.inc.php(117): ShopCore::initialize() #9 /home/zegyntblo26o/public_html/cstms_store/index.php(27): require('/home/zegyntblo...') #10 {main} thrown in /home/zegyntblo26o/public_html/cstms_store/vendor/symfony/symfony/src/Symfony/Component/Yaml/Parser.php on line 493 Edited July 19, 2023 by fixxer1 (see edit history) Link to comment Share on other sites More sharing options...
fixxer1 Posted July 19, 2023 Author Share Posted July 19, 2023 (edited) So after little investigations I came to this: The information in logs refers to problem with theme.yml file. As I go to search for it, I noticed that classic theme folder appeared to be renamed in the '/themes' folder (I don't remember why I did this). I changed the name of the folder back to "classic", so now everything is supposed to be fine, the .yml file is on it's place, it says name: classic; display_name: Classic in the beginning. But I'm still getting a 500-crash of both back and front offices. What should I check now? Edited July 19, 2023 by fixxer1 (see edit history) Link to comment Share on other sites More sharing options...
fixxer1 Posted July 19, 2023 Author Share Posted July 19, 2023 After this I thought there has to be the way to change the theme back to the one that I created through FTP, bypassing back-office. I went to /classes/shop/Shop.php and in the line 502 I changed $this->theme_name = 'classic'; to $this->theme_name = 'cstms'; So now I should have my website back on my custom theme and working again. But still I have a crash. Please let me know how to reconstruct the site? Link to comment Share on other sites More sharing options...
fixxer1 Posted July 23, 2023 Author Share Posted July 23, 2023 Finally have restored access to the site by checking this: In /home/zegyntblo26o/public_html/cstms_store/config/themes/cstms directory there was shop1.json file missing. Found this file in /home/zegyntblo26o/public_html/cstms_store/config/themes/cstms_theme dir. Why on earth did it go there - I don't know... So, can close the topic, may be this helps somebody in the future. 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