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

Changing asset metadata in grid breaks version #603

Closed
fashxp opened this issue Dec 2, 2024 · 8 comments · Fixed by #604
Closed

Changing asset metadata in grid breaks version #603

fashxp opened this issue Dec 2, 2024 · 8 comments · Fixed by #604

Comments

@fashxp
Copy link
Member

fashxp commented Dec 2, 2024

  • Update asset metadata in grid
    Image
  • open asset detail and try to open just created version
    Image

[2024-12-02T10:47:35.213352+00:00] app.ERROR: TypeError: Pimcore\Bundle\StudioBackendBundle\Version\Schema\CustomMetadataVersion::__construct(): Argument #2 ($language) must be of type string, null given, called in /var/www/html/vendor/pimcore/studio-backend-bundle/src/Version/Hydrator/CustomMetadataVersionHydrator.php on line 43 and defined in /var/www/html/vendor/pimcore/studio-backend-bundle/src/Version/Schema/CustomMetadataVersion.php:32 Stack trace: #0 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Version/Hydrator/CustomMetadataVersionHydrator.php(43): Pimcore\Bundle\StudioBackendBundle\Version\Schema\CustomMetadataVersion->__construct('author', NULL, 'input', 'WikimediaImages...') #1 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Version/Hydrator/CustomMetadataVersionHydrator.php(36): Pimcore\Bundle\StudioBackendBundle\Version\Hydrator\CustomMetadataVersionHydrator->hydrateSingle(Array) #2 [internal function]: Pimcore\Bundle\StudioBackendBundle\Version\Hydrator\CustomMetadataVersionHydrator->Pimcore\Bundle\StudioBackendBundle\Version\Hydrator\{closure}(Array) #3 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Version/Hydrator/CustomMetadataVersionHydrator.php(35): array_map(Object(Closure), Array) #4 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Version/Hydrator/AssetVersionHydrator.php(69): Pimcore\Bundle\StudioBackendBundle\Version\Hydrator\CustomMetadataVersionHydrator->hydrate(Array) #5 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Version/Hydrator/AssetVersionHydrator.php(57): Pimcore\Bundle\StudioBackendBundle\Version\Hydrator\AssetVersionHydrator->hydrateAsset(Object(Pimcore\Model\Asset\Image)) #6 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Version/Service/VersionDetailService.php(128): Pimcore\Bundle\StudioBackendBundle\Version\Hydrator\AssetVersionHydrator->hydrate(Object(Pimcore\Model\Asset\Image)) #7 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Version/Service/VersionDetailService.php(58): Pimcore\Bundle\StudioBackendBundle\Version\Service\VersionDetailService->hydrate(Object(Pimcore\Model\Asset\Image), 'Pimcore\\Model\\A...') #8 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Version/Controller/GetController.php(74): Pimcore\Bundle\StudioBackendBundle\Version\Service\VersionDetailService->getVersionData(50, Object(Pimcore\Model\User)) #9 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Pimcore\Bundle\StudioBackendBundle\Version\Controller\GetController->getVersions(50) #10 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #11 /var/www/html/vendor/symfony/http-kernel/Kernel.php(197): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #12 /var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #13 /var/www/html/vendor/autoload_runtime.php(29): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() #14 /var/www/html/public/index.php(20): require_once('/var/www/html/v...') #15 {main} [] []

@markus-moser markus-moser transferred this issue from pimcore/studio-ui-bundle Dec 2, 2024
@markus-moser
Copy link

markus-moser commented Dec 2, 2024

Currently the language needs to be a string, it should be optional/nullable

@mattamon
Copy link
Contributor

mattamon commented Dec 2, 2024

@markus-moser #604

I still do not get why we use tags like these @pimcore-studio-backend-team?
Nobody is getting notified - this is not a proper method get our attention :)

@markus-moser
Copy link

@mattamon This is not meant as a notificaton. It's just a hint that this comment is for you, I can also skip it if you prefer.

@markus-moser
Copy link

Now the comment looks like this:

Image

The advantage before was that you can be sure that it's a comment for you and not a frontend internal one, this is the only reasen why I did this. ;)

@mattamon
Copy link
Contributor

mattamon commented Dec 2, 2024

Now the comment looks like this:

Image

The advantage before was that you can be sure that it's a comment for you and not a frontend internal one, this is the only reasen why I did this. ;)

I see, but since it is already in the backend bundle I think it is clear enough? :)

@markus-moser
Copy link

In this case yes, but it was in the frontend repo before and I moved it... Sometimes we can jump around between the different teams and therefore I used this notation sometimes in the past to give a bit of attention to the relevant comment so that you don't need to read everything in detail. But at the end it's just the list in your backlog (or board of the galaxy) which is relevant as it's not possible to notify teams (and also not needed, the backlog approach is fine, most of the time there is no need for immediate action).

@markus-moser
Copy link

@fashxp Could you please re-try if it works now after updating the backend bundle?

@fashxp
Copy link
Member Author

fashxp commented Dec 2, 2024

looks good now 👍 thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants