Search the Community
Showing results for tags 'symfony exception'.
-
Hello! I need help solving a problem. I tried to upgrade my Prestashop from 1.7.7.0 to 1.7.8.2 with 1-Click Upgrade addon, and something went wrong. After that, all the refreshes on admin/backoffice or website goes to an Internal Server Error (HTTP ERROR 500). Checking the "error_log" file, I get this log for both pages: [22-Dec-2021 23:12:24 UTC] PHP Fatal error: Uncaught Symfony\Component\Config\Util\Exception\XmlParsingException: [ERROR 522] Validation failed: no DTD found ! (in n/a - line 2, column 68) [ERROR 73] expected '>' (in n/a - line 67, column 11) [ERROR 76] Opening and ending tag mismatch: xliff line 2 and xlif (in n/a - line 67, column 11) in DIRECTORY_TO_SITE/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:66 Stack trace: #0 DIRECTORY_TO_SITE/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php(146): Symfony\Component\Config\Util\XmlUtils::parse('<?xml version="...', NULL) #1 DIRECTORY_TO_SITE/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/XliffFileLoader.php(54): Symfony\Component\Config\Util\XmlUtils::loadFile('/home/s001539/d...') #2 DIRECTORY_TO_SITE/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/XliffFileLoader.php(42): Symfony\Component\Translation\Loader\XliffFileLoader->extract('/home/s001539/d...', Object(Symfony\Compo in DIRECTORY_TO_SITE/vendor/symfony/symfony/src/Symfony/Component/Translation/Loader/XliffFileLoader.php on line 56 I tried to fix it in different ways: checked the PHP version and all the extensions checked the minimum and recommended versions and extensions with "PHP PrestaShop Info" (phppsinfo.php), and all the items is OK in green color downloaded the latest release of Prestashop and updated (and replaced the existing) files by FTP executed the "composer upgrade" command to rebuild the vendor folder clear the "var/cache/" content Nothing solved my problem. Any suggestion? I would love not to lost all the installation of my website, avoiding to make a new fresh installation on it...
- 1 reply
-
- error
- prestashop 1.7x
- (and 9 more)
-
After a fairly long break from Prestashop I find myself once again falling down the rabbit hole. I have a site that was on 1.6.1.0 that I have migrated over to 1.7.7.0 and then upgraded to 1.7.7.1. Initially I upgraded the site to 1.6.1.24 (to allow me to use at least php 7.1) and then performed an in-place upgrade to 1.7.6.9. Upgrade was fine except the categories were broken. I then did a fresh 1.7.7.0 install and migrated the products over (from 1.6.1.0) using a migration plugin but the result was the same - so obviously a problem with the category structure on the source store. No custom modules are installed. After much analysis I managed to fix the issue by removing an extra "root" category in the database which seemed to have been inserted at some point (Home category had this extra category as its parent, and then that category had the real category "root" as its parent). I also refactored the level_depth (one less) via SQL. Verifying the PS_ROOT_CATEGORY and PS_HOME_CATEGORY configuration was correct and making sure the home category was set correctly for the store (there is only one store as multishop is disabled) resulted in the correct home category being displayed on the admin page and everything seems to work fine (SQL is as expected, categories display correctly and I can add and delete categories without error in the backoffice). The only weird thing I noticed was that the categories weren't available in the main menu plugin so I uninstalled it, along with any other module referencing categories... hmm. HOWEVER, I now get an error when running debug mode "An error occurred while loading the web debug toolbar." Opening the symfony profiler shows the image attached... Am really hoping someone has seen this and it's a really trivial thing to fix because it's annoying the heck out of me. I'm assuming it's not working for a reason. I have tried removing the cache files (/var/cache/dev/*), cookies, php session files etc. Accessing the backoffice from a browser on another machine makes no difference. Am now stuck on options to try. I could delete all the categories and put them back in again using the back office but that would be a pain as I need to keep the ids the same as well as the products needing to be placed in the correct categories. Running this on Ubuntu 20.04 (WSL 1) with apache 2, PHP 7.3.25-1+ubuntu20.04.1+deb.sury.org+1, MYSQL 8.0.22-0ubuntu0.20.04.3. All the settings and php modules are those recommended and required. No errors in the php error log....
-
Hi, I deleted a language (International - Localization - Languages - Delete ("language record"). this error has occurred Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/prestahopTest/modules/index.php/mails/fr/) is not within the allowed path(s): (/var/www/vhosts/prestahopTest:/tmp) The php instruction located in "classes/Language.php" (line 545): Tools::deleteDirectory(_PS_MODULE_DIR_ . $mod . '/mails/' . $this->iso_code); has executed this command: ToolsCore::deleteDirectory('/var/www/vhosts/prestashopTest/modules/index.php/mails/fr/') the code with error is: Symfony\Component\Debug\Exception\ ContextErrorException in classes/Tools.php (line 1091) * @param string $dirname Directory name */ public static function deleteDirectory($dirname, $delete_self = true) { $dirname = rtrim($dirname, '/') . '/'; if (file_exists($dirname)) { <------------------------------------------------ if ($files = scandir($dirname, SCANDIR_SORT_NONE)) { foreach ($files as $file) { if ($file != '.' && $file != '..' && $file != '.svn') { if (is_dir($dirname . $file)) { Tools::deleteDirectory($dirname . $file); my question is: how does the command "file_exists" search on a path that contains ".../modules/index.php/mails/..." ? this path will never exist! Thanks