Project

General

Profile

Actions

Bug #101875

closed

TYPO3 v.12 | Graphics Magick does not work!!!

Added by Claus Harup 8 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
-
Start date:
2023-09-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

In \typo3\cms-install\Classes\Configuration\Image\GraphicsMagickPreset.php findGraphicsMagickInPaths gets called with:

[
        '/usr/local/bin/',
        '/opt/local/bin/',
        '/usr/bin/',
        '/usr/X11R6/bin/',
        '/opt/bin/',
        'C:/php/ImageMagick/',
        'C:/php/GraphicsMagick/',
        'C:/apache/ImageMagick/',
        'C:/apache/GraphicsMagick/',
    ]
protected function findGraphicsMagickInPaths(array $searchPaths)
    {
        $result = false;
        foreach ($searchPaths as $path) {
            if (Environment::isWindows()) {
                $executable = 'gm.exe';
            } else {
                $executable = 'gm';
            }

            $binaryPath = $path . $executable;
            if (!file_exists($binaryPath) || !is_executable($binaryPath)) {
                break;
            }

            $command = escapeshellarg($binaryPath) . ' -version';
            $executingResult = [];
            @CommandUtility::exec($command, $executingResult);
            // First line of exec command should contain string GraphicsMagick
            $firstResultLine = array_shift($executingResult);
            if (is_string($firstResultLine) && str_contains($firstResultLine, 'GraphicsMagick')) {
                $this->foundPath = $path;
                $result = true;
                break;
            }
        }

        return $result;
    }

The break makes it imposible to reach to our path [/usr/bin/]......

Please replace the break with continue :-)


Files


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #101687: Install Tool Configuration Presets broken for image handling settingsResolved2023-08-15

Actions
Actions #1

Updated by Stefan Bürk 8 months ago

  • Is duplicate of Bug #101687: Install Tool Configuration Presets broken for image handling settings added
Actions #2

Updated by Stefan Bürk 8 months ago

  • Status changed from New to Resolved
  • Assignee set to Stefan Bürk

This is already fixed and resolved with #101687.

Will be included in the next release.

Note: If you have a composer based installation, you may use
composer patches to test the v12 backport as composer patch
until the release.

Going to close this issue as duplicate and solved issue. If
this was to early feel free to reopening or request to opening
the issue again.

Actions

Also available in: Atom PDF