Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Asset] Setting focal point breaks image asset #9431

Closed
rberneder opened this issue Jun 14, 2021 · 1 comment
Closed

[Asset] Setting focal point breaks image asset #9431

rberneder opened this issue Jun 14, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@rberneder
Copy link
Contributor

Scenario

When setting a focal point within an image asset, the image breaks. It can no longer be displayed in the backend UI. Also every view where the image is placed breaks and shows a placeholder image.

Server exception response

{
  "success": false,
  "message": "Pimcore\\Model\\Asset\\Image\\Thumbnail::getLocalFileFromStream(): Return value must be of type string, null returned",
  "trace": [
    {
      "file": "\/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset\/Thumbnail\/ImageThumbnailTrait.php",
      "line": 312,
      "function": "getLocalFileFromStream",
      "class": "Pimcore\\Model\\Asset\\Image\\Thumbnail",
      "type": "::",
      "args": [
        null
      ]
    },
    {
      "file": "\/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset\/Image.php",
      "line": 148,
      "function": "getLocalFile",
      "class": "Pimcore\\Model\\Asset\\Image\\Thumbnail",
      "type": "-\u003E",
      "args": []
    },
    {
      "file": "\/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset\/Image.php",
      "line": 96,
      "function": "detectFaces",
      "class": "Pimcore\\Model\\Asset\\Image",
      "type": "-\u003E",
      "args": []
    },
    {
      "file": "\/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset.php",
      "line": 731,
      "function": "postPersistData",
      "class": "Pimcore\\Model\\Asset\\Image",
      "type": "-\u003E",
      "args": []
    },
    {
      "file": "\/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset\/Image.php",
      "line": 75,
      "function": "update",
      "class": "Pimcore\\Model\\Asset",
      "type": "-\u003E",
      "args": [
        []
      ]
    },
    {
      "file": "\/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset.php",
      "line": 533,
      "function": "update",
      "class": "Pimcore\\Model\\Asset\\Image",
      "type": "-\u003E",
      "args": [
        []
      ]
    },
    {
      "file": "\/var\/www\/html\/vendor\/pimcore\/pimcore\/bundles\/AdminBundle\/Controller\/Admin\/Asset\/AssetController.php",
      "line": 992,
      "function": "save",
      "class": "Pimcore\\Model\\Asset",
      "type": "-\u003E",
      "args": []
    },
    {
      "file": "\/var\/www\/html\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php",
      "line": 157,
      "function": "saveAction",
      "class": "Pimcore\\Bundle\\AdminBundle\\Controller\\Admin\\Asset\\AssetController",
      "type": "-\u003E",
      "args": [
        {
          "attributes": {},
          "request": {},
          "query": {},
          "server": {},
          "files": {},
          "cookies": {},
          "headers": {}
        },
        {}
      ]
    },
    {
      "file": "\/var\/www\/html\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php",
      "line": 79,
      "function": "handleRaw",
      "class": "Symfony\\Component\\HttpKernel\\HttpKernel",
      "type": "-\u003E",
      "args": [
        {
          "attributes": {},
          "request": {},
          "query": {},
          "server": {},
          "files": {},
          "cookies": {},
          "headers": {}
        },
        1
      ]
    },
    {
      "file": "\/var\/www\/html\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Kernel.php",
      "line": 195,
      "function": "handle",
      "class": "Symfony\\Component\\HttpKernel\\HttpKernel",
      "type": "-\u003E",
      "args": [
        {
          "attributes": {},
          "request": {},
          "query": {},
          "server": {},
          "files": {},
          "cookies": {},
          "headers": {}
        },
        1,
        true
      ]
    },
    {
      "file": "\/var\/www\/html\/public\/index.php",
      "line": 35,
      "function": "handle",
      "class": "Symfony\\Component\\HttpKernel\\Kernel",
      "type": "-\u003E",
      "args": [
        {
          "attributes": {},
          "request": {},
          "query": {},
          "server": {},
          "files": {},
          "cookies": {},
          "headers": {}
        }
      ]
    }
  ],
  "traceString": "in \/var\/www\/html\/vendor\/pimcore\/pimcore\/lib\/Helper\/TemporaryFileHelperTrait.php:45\n#0 \/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset\/Thumbnail\/ImageThumbnailTrait.php(312): Pimcore\\Model\\Asset\\Image\\Thumbnail::getLocalFileFromStream(NULL)\n#1 \/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset\/Image.php(148): Pimcore\\Model\\Asset\\Image\\Thumbnail-\u003EgetLocalFile()\n#2 \/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset\/Image.php(96): Pimcore\\Model\\Asset\\Image-\u003EdetectFaces()\n#3 \/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset.php(731): Pimcore\\Model\\Asset\\Image-\u003EpostPersistData()\n#4 \/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset\/Image.php(75): Pimcore\\Model\\Asset-\u003Eupdate(Array)\n#5 \/var\/www\/html\/vendor\/pimcore\/pimcore\/models\/Asset.php(533): Pimcore\\Model\\Asset\\Image-\u003Eupdate(Array)\n#6 \/var\/www\/html\/vendor\/pimcore\/pimcore\/bundles\/AdminBundle\/Controller\/Admin\/Asset\/AssetController.php(992): Pimcore\\Model\\Asset-\u003Esave()\n#7 \/var\/www\/html\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php(157): Pimcore\\Bundle\\AdminBundle\\Controller\\Admin\\Asset\\AssetController-\u003EsaveAction(Object(Symfony\\Component\\HttpFoundation\\Request), Object(Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher))\n#8 \/var\/www\/html\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php(79): Symfony\\Component\\HttpKernel\\HttpKernel-\u003EhandleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#9 \/var\/www\/html\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Kernel.php(195): Symfony\\Component\\HttpKernel\\HttpKernel-\u003Ehandle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#10 \/var\/www\/html\/public\/index.php(35): Symfony\\Component\\HttpKernel\\Kernel-\u003Ehandle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#11 {main}"
}

Tested on Pimcore v.10.0.3 and Pimcore Demo.

@fashxp fashxp added the Bug label Jun 14, 2021
@fashxp fashxp added this to the 10.0.5 milestone Jun 14, 2021
@dvesh3 dvesh3 self-assigned this Jun 14, 2021
@dvesh3 dvesh3 modified the milestones: 10.0.5, 10.0.6 Jun 23, 2021
@brusch brusch modified the milestones: 10.0.6, 10.0.7 Jun 24, 2021
@dvesh3 dvesh3 assigned brusch and unassigned dvesh3 Jun 25, 2021
@brusch
Copy link
Member

brusch commented Jul 5, 2021

Fixed by #9679

@brusch brusch closed this as completed Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants