Jump to content

Cannot upload new product image


kevin avent

Recommended Posts

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

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

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

  • 1 month later...

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 by kevin avent (see edit history)
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...