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

[Bug]: Saving of select value in Block > Field Collection > Block produce 500 | Internal Server Error #14072

Closed
svenkovhd opened this issue Jan 16, 2023 · 5 comments · Fixed by #14139
Assignees
Labels

Comments

@svenkovhd
Copy link

Expected behavior

To be saved value in the select of the Class Instance.

I tried it in the https://demo.pimcore.fun/admin/ and error is available.

Actual behavior

Got error:

Status: 500 | Internal Server Error
URL: /admin/object/get
Message:
{"success":false,"message":"Call to a member function getData() on string"}
Fatal error: Uncaught Error: Call to a member function getData() on string in /var/www/html/vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Block.php:823
Stack trace:
#0 /var/www/html/vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Fieldcollections.php(418): Pimcore\Model\DataObject\ClassDefinition\Data\Block->getCacheTags(Array, Array)
#1 /var/www/html/vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Block.php(825): Pimcore\Model\DataObject\ClassDefinition\Data\Fieldcollections->getCacheTags(Object(Pimcore\Model\DataObject\Fieldcollection), Array)
#2 /var/www/html/vendor/pimcore/pimcore/models/DataObject/Concrete.php(364): Pimcore\Model\DataObject\ClassDefinition\Data\Block->getCacheTags(Object(Pimcore\Model\DataObject\Fieldcollection), Array)
#3 /var/www/html/vendor/pimcore/pimcore/lib/Cache/Core/CoreCacheHandler.php(472): Pimcore\Model\DataObject\Concrete->getCacheTags(Array)
#4 /var/www/html/vendor/pimcore/pimcore/lib/Cache/Core/CoreCacheHandler.php(907): Pimcore\Cache\Core\CoreCacheHandler->prepareCacheTags('object_1189', Object(Pimcore\Model\DataObject\ClassWithFieldCollectionInBlock), Array)
#5 /var/www/html/vendor/pimcore/pimcore/lib/Cache/Core/CoreCacheHandler.php(960): Pimcore\Cache\Core\CoreCacheHandler->writeSaveQueue()
#6 /var/www/html/vendor/pimcore/pimcore/lib/Cache.php(200): Pimcore\Cache\Core\CoreCacheHandler->shutdown(false)
#7 /var/www/html/vendor/pimcore/pimcore/lib/Pimcore.php(259): Pimcore\Cache::shutdown()
#8 /var/www/html/vendor/pimcore/pimcore/lib/Kernel.php(328): Pimcore::shutdown()
#9 [internal function]: Pimcore\Kernel->Pimcore{closure}()
#10 {main}
thrown in /var/www/html/vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Block.php on line 823

Steps to reproduce

  1. Create Field Collection with Fieldset > Block > Fieldset > Select.
  2. Create Class with Fieldset > Block > Fieldset > Field Collection [created above].
  3. Create instance of the Class.
  4. Select any value in the select and save.
  5. Got error in the admin panel.
@svenkovhd svenkovhd added the Bug label Jan 16, 2023
@fashxp fashxp linked a pull request Jan 25, 2023 that will close this issue
@fashxp
Copy link
Member

fashxp commented Jan 25, 2023

field collections are not allowed inside blocks.

see also #14139

@lukmzig lukmzig assigned fashxp and unassigned lukmzig Jan 25, 2023
@brusch
Copy link
Member

brusch commented Jan 27, 2023

Imho this won't be possible in future anyway, closing this.

@brusch brusch closed this as completed Jan 27, 2023
@kanevbg
Copy link

kanevbg commented Feb 4, 2023

In Pimcore 10.5.16 you can add blocks to field collection definitions, but I guess you did not support that either?

image

@brusch @fashxp Please let me know if this should not be used too.

@kanevbg
Copy link

kanevbg commented Feb 14, 2023

up

@fashxp
Copy link
Member

fashxp commented Feb 15, 2023

In Pimcore 10.5.16 you can add blocks to field collection definitions, but I guess you did not support that either?

image

@brusch @fashxp Please let me know if this should not be used too.

That should be perfectly fine afaik.

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

Successfully merging a pull request may close this issue.

5 participants