Jump to content

How can you debug this?


musicmaster

Recommended Posts

When I change an image in the topmenu program of my template I get the error "The file "/tmp/phpnWYRUf" does not exist" with the file name every time different but always starting with /tmp/php. The pictture is at the bottom.

The location of the code indicates that the error happens in a hook. Adding some debug code produced that it happens in the autoupgrade module in the displayBackofficeHeader hook.

The relevant code in the autoupgrade module looks so:

public function hookDisplayBackOfficeHeader()
{
	if (!$this->initAutoloaderIfCompliant()) {
		return '';
	}

	if (isset($this->context->controller->ajax) && $this->context->controller->ajax) {
		return '';
	}

	return (new \PrestaShop\Module\AutoUpgrade\Hooks\DisplayBackOfficeHeader($this->getUpgradeContainer()))->renderUpdateNotification();
}

Does anyone know how to solve this?

In the error log file under /var/logs I find the following two errors

Quote

[2025-12-17 14:38:27] php.CRITICAL: Uncaught Exception: The file "/tmp/phpnWYRUf" does not exist {"exception":"[object] (PrestaShop\\PrestaShop\\Core\\Exception\\CoreException(code: 0): The file \"/tmp/phpnWYRUf\" does not exist at /var/www/html/staranova/classes/Hook.php:434, Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException(code: 0): The file \"/tmp/phpnWYRUf\" does not exist at /var/www/html/staranova/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php:36)"} []
[2025-12-17 14:38:27] request.CRITICAL: Uncaught PHP Exception PrestaShop\PrestaShop\Core\Exception\CoreException: "The file "/tmp/phpnWYRUf" does not exist" at /var/www/html/staranova/classes/Hook.php line 434 {"exception":"[object] (PrestaShop\\PrestaShop\\Core\\Exception\\CoreException(code: 0): The file \"/tmp/phpnWYRUf\" does not exist at /var/www/html/staranova/classes/Hook.php:434, Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException(code: 0): The file \"/tmp/phpnWYRUf\" does not exist at /var/www/html/staranova/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php:36)"} []

The File.php Symfony file contains this (summarized):

class File extends \SplFileInfo
{   /**
     * Constructs a new file from the given path.
     * @throws FileNotFoundException If the given path is not a file
     */
    public function __construct(string $path, bool $checkPath = true)
    {
        if ($checkPath && !is_file($path)) {
            throw new FileNotFoundException($path);
        }
        parent::__construct($path);
    }

It throws the FileNotFoundException.

The original error looks so:

hookexists.thumb.jpg.ddba0f658c0df6182ec68fd982214919.jpg

 

Edited by musicmaster (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...