kevin avent Posted January 19 Share Posted January 19 We get a 500 error and when we have debug on we see the below errors, please help? Prestashop 8.1.2 - fresh install -------------- Attempted to call function "mime_content_type" from namespace "PrestaShop\PrestaShop\Adapter\Image". Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\UndefinedFunctionError: "Attempted to call function "mime_content_type" from namespace "PrestaShop\PrestaShop\Adapter\Image"." at /home/whitevapeco/public_html/src/Adapter/Image/ImageValidator.php line 92 "exception" => Symfony\Component\ErrorHandler\Error\UndefinedFunctionError {#4017 ▶} ---------- Uncaught Error: Call to undefined function PrestaShop\PrestaShop\Adapter\Image\mime_content_type() [▼ "exception" => Error {#4022 ▶} ] Link to comment Share on other sites More sharing options...
AddWeb Solution Posted January 22 Share Posted January 22 Hi, What is the PHP version you use? Thanks! Link to comment Share on other sites More sharing options...
Sandeep Tiwari Posted January 22 Share Posted January 22 Please make sure "fileinfo" extension is installed on your server in order to use mime_content_type.https://www.php.net/manual/en/book.fileinfo.php Link to comment Share on other sites More sharing options...
kevin avent Posted January 22 Author Share Posted January 22 Thanks for your replies, we have it running on PHP 8.1. We built the site on another server and then moved it to this one, we thought there might have been an issue with the transfer, so deleted it and uploaded the site again. Initially, we had to delete the Cache folder to get it working but now if we try and open a product we get the following error? PrestaShopBundle\Form\Admin\Type\TranslatorAwareType::__construct(), 0 passed in /home/website/public_html/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php on line 89 and exactly 2 expected Thanks for the help everyone Link to comment Share on other sites More sharing options...
kevin avent Posted January 22 Author Share Posted January 22 5 hours ago, Sandeep Tiwari said: Please make sure "fileinfo" extension is installed on your server in order to use mime_content_type.https://www.php.net/manual/en/book.fileinfo.php Thanks for this, yes it wasn't installed on the server, it is now :). Still getting the new error though since we re-installed it? Link to comment Share on other sites More sharing options...
kevin avent Posted January 22 Author Share Posted January 22 Also see this in logs: Uncaught PHP Exception ArgumentCountError: "Too few arguments to function PrestaShopBundle\Form\Admin\Type\TranslatorAwareType::__construct(), 0 passed in /home/website/public_html/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php on line 89 and exactly 2 expected" at /home/whitevapeco/public_html/src/PrestaShopBundle/Form/Admin/Type/TranslatorAwareType.php line 50 { "exception": {} } Link to comment Share on other sites More sharing options...
Sandeep Tiwari Posted January 25 Share Posted January 25 Please try to clear cache under var/cache folder and downgrade your PHP version to 7.4. Let me know if the issue still persist. Link to comment Share on other sites More sharing options...
kevin avent Posted February 25 Author Share Posted February 25 (edited) Hi, thanks for your reply. Ok so clearing the cache appeared to sort the issue. We now have an issue where we cannot open an individual product, we get errors, we have deleted the cache and tried downgrading the php to 7.4 with no luck: /public_html/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php on line 89 and exactly 2 expected [ArgumentCountError 0] With debug on: Uncaught PHP Exception ArgumentCountError: "Too few arguments to function PrestaShopBundle\Form\Admin\Type\TranslatorAwareType::__construct(), 0 passed in /public_html/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php on line 89 and exactly 2 expected" at /home/whitevapeco/public_html/src/PrestaShopBundle/Form/Admin/Type/TranslatorAwareType.php line 50 Uncaught Error: Too few arguments to function PrestaShopBundle\Form\Admin\Type\TranslatorAwareType::__construct(), 0 passed in /public_html/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php on line 89 and exactly 2 expected UPDATE: found the issue, it is Prestahero SEO module causing problems. Edited February 25 by kevin avent (see edit history) Link to comment Share on other sites More sharing options...
desertscooters Posted Saturday at 12:41 AM Share Posted Saturday at 12:41 AM On 2/25/2024 at 9:39 AM, kevin avent said: Hi, thanks for your reply. Ok so clearing the cache appeared to sort the issue. We now have an issue where we cannot open an individual product, we get errors, we have deleted the cache and tried downgrading the php to 7.4 with no luck: /public_html/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php on line 89 and exactly 2 expected [ArgumentCountError 0] With debug on: Uncaught PHP Exception ArgumentCountError: "Too few arguments to function PrestaShopBundle\Form\Admin\Type\TranslatorAwareType::__construct(), 0 passed in /public_html/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php on line 89 and exactly 2 expected" at /home/whitevapeco/public_html/src/PrestaShopBundle/Form/Admin/Type/TranslatorAwareType.php line 50 Uncaught Error: Too few arguments to function PrestaShopBundle\Form\Admin\Type\TranslatorAwareType::__construct(), 0 passed in /public_html/vendor/symfony/symfony/src/Symfony/Component/Form/FormRegistry.php on line 89 and exactly 2 expected UPDATE: found the issue, it is Prestahero SEO module causing problems. What was the fix? To uninstall the module? Or were you able to fix so you can still use it? I have the exact same issue, right after installing Prestahero SEO. I don't really want to uninstall a module that I paid for. Link to comment Share on other sites More sharing options...
musicmaster Posted Saturday at 03:47 AM Share Posted Saturday at 03:47 AM 3 hours ago, desertscooters said: What was the fix? To uninstall the module? Or were you able to fix so you can still use it? I have the exact same issue, right after installing Prestahero SEO. I don't really want to uninstall a module that I paid for. If you have a problem with a module you should contact its maker. It is their responsibility to provide you with a good product. Link to comment Share on other sites More sharing options...
desertscooters Posted Saturday at 04:01 AM Share Posted Saturday at 04:01 AM 10 minutes ago, musicmaster said: If you have a problem with a module you should contact its maker. It is their responsibility to provide you with a good product. The maker hasn't yet responded. But this is the same issue I am having. Hopefully the previous poster will reply with insight. 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