Oksydan / falcon

Prestashop starter theme that provides great development experience.
GNU General Public License v3.0
242 stars 60 forks source link

šŸ› [BUG] - <Customize Product with text and File> #375

Open ePiliK opened 6 months ago

ePiliK commented 6 months ago

Description

if you activate product customization, where customers can put a text and an image (file).

When you load the image and save the customization this error appears.

Fatal error: Uncaught Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException: The file "/tmp/phpvto0Z6" does not exist in /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php:36 Stack trace: #0 /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/UploadedFile.php(77): Symfony\Component\HttpFoundation\File\File->construct() #1 /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php(86): Symfony\Component\HttpFoundation\File\UploadedFile->__construct() #2 /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php(52): Symfony\Component\HttpFoundation\FileBag->convertFileInformation() #3 /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php(61): Symfony\Component\HttpFoundation\FileBag->set() #4 /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php(40): Symfony\Component\HttpFoundation\FileBag->add() #5 /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/FileBag.php(31): Symfony\Component\HttpFoundation\FileBag->replace() #6 /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php(269): Symfony\Component\HttpFoundation\FileBag->construct() #7 /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php(247): Symfony\Component\HttpFoundation\Request->initialize() #8 /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php(1978): Symfony\Component\HttpFoundation\Request->construct() #9 /home/falcon.local/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php(293): Symfony\Component\HttpFoundation\Request::createRequestFromFactory() #10 /home/falcon.local/public_html/modules/is_themecore/src/Core/ListingDisplay/ThemeListDisplay.php(38): Symfony\Component\HttpFoundation\Request::createFromGlobals() #11 /home/falcon.local/public_html/modules/is_themecore/src/Hook/Header.php(35): Oksydan\Module\IsThemeCore\Core\ListingDisplay\ThemeListDisplay->getDisplay() #12 /home/falcon.local/public_html/modules/is_themecore/src/HookDispatcher.php(57): Oksydan\Module\IsThemeCore\Hook\Header->hookDisplayHeader() #13 /home/falcon.local/public_html/modules/is_themecore/is_themecore.php(192): Oksydan\Module\IsThemeCore\HookDispatcher->dispatch() #14 /home/falcon.local/public_html/classes/Hook.php(993): Is_themecore->call() #15 /home/falcon.local/public_html/classes/Hook.php(418): HookCore::coreCallHook() #16 /home/falcon.local/public_html/classes/Hook.php(928): HookCore::callHookOn() #17 /home/falcon.local/public_html/classes/controller/FrontController.php(577): HookCore::exec() #18 /home/falcon.local/public_html/controllers/front/ProductController.php(464): FrontControllerCore->initContent() #19 /home/falcon.local/public_html/classes/controller/Controller.php(319): ProductControllerCore->initContent() #20 /home/falcon.local/public_html/classes/Dispatcher.php(510): ControllerCore->run() #21 /home/falcon.local/public_html/index.php(28): DispatcherCore->dispatch() #22 {main} Next PrestaShop\PrestaShop\Core\Exception\CoreException: The file "/tmp/phpvto0Z6" does not exist in /home/falcon.local/public_html/classes/Hook.php:431 Stack trace: #0 /home/falcon.local/public_html/classes/Hook.php(928): HookCore::callHookOn() #1 /home/falcon.local/public_html/classes/controller/FrontController.php(577): HookCore::exec() #2 /home/falcon.local/public_html/controllers/front/ProductController.php(464): FrontControllerCore->initContent() #3 /home/falcon.local/public_html/classes/controller/Controller.php(319): ProductControllerCore->initContent() #4 /home/falcon.local/public_html/classes/Dispatcher.php(510): ControllerCore->run() #5 /home/falcon.local/public_html/index.php(28): DispatcherCore->dispatch() #6 {main} thrown in /home/falcon.local/public_html/classes/Hook.php on line 431

I think it all depends on Falcon's core.

Node.js version

v16

php version

v8.1

OS and it's version

linux

Browsers

Chrome

Required module/theme

is_themecore

Reproduction steps

if you create a customizable product, the error appears when you insert an image and save the customization.

If you refresh the page the image is loaded correctly

Logs

No response

Oksydan commented 5 months ago

Hi @ePiliK,

thank you for creating an issue. I wasn't able to reproduce an error. It looks like it might be permission problem in your environment for tmp directory.

Fatal error: Uncaught Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException: The file "/tmp/phpvto0Z6" does not exist in
ePiliK commented 5 months ago

img1 image

the tmp folder has full access.

I tried on two different servers and this error appears in both. but it's something at the cache level, because then the image is actually saved in the product

Oksydan commented 5 months ago

Did you try on clear prestashop installation? I am not able to reproduce it, so I am not able to fix it.

ePiliK commented 5 months ago

Yes, I did several tests, and even with clean installation it produces the same problem.

If I switch to the basic prestashop theme I don't have this problem

Oksydan commented 5 months ago

Can you provide me more information about your server configuration?

ePiliK commented 5 months ago

info_outline Informazioni sul server Informazioni sul server: Linux #184-Ubuntu SMP Tue Oct 31 09:21:49 UTC 2023 x86_64 Versione software del server: LiteSpeed Versione di PHP: 8.1.24 Limite di memoria: 2048M Tempo di esecuzione massimo: 6000

Dimensione Max. dei file da caricare: 64M info_outline Informazioni datatbase Versione MySQL: 10.3.39-MariaDB-0ubuntu0.20.04.2 Server MySQL: Nome MySQL: Utente MySQL: *****

Prefisso delle tabelle: ps_ Motore MySQL: InnoDB Driver MySQL: DbPDO

info_outline Elenco delle sostituzioni classes/Link.php info_outline Informazioni negozio Versione di PrestaShop: 8.1.1

URL negozio: https:/// Percorso negozio: /home//public_html Tema attualmente utilizzato: Falcon

if I switch off debug mode, the process works (although I get the error underneath)

Oksydan commented 2 months ago

Hi @ePiliK,

I was able to reproduce an issue. Thank you for your report.