Open kochen opened 6 years ago
Thanks @kochen! Could you have a look at the failing build?
Could not find a defined element with name "block". The defined ones are: cmf-block.
@michalmarcinkowski could it be that:
$this->getElement('block')
needs to actually be:
$this->getElement('cmf-block')
and it has nothing to do with my fix?
@michalmarcinkowski the fix I proposed, solves issue #31, allowing existing blocks which already contain image to be edited and image to be added/replaced.
But, when a new (i.e custom) block is created with a new image, there is an error:
The node '/cms/media' already has a child named 'image''.
which is eventually what causes the test to fail.
Any idea how to solve this one?
How is it possible that the tests pass on master branch, but not on yours? Have you tried to debug which of your change cased the error?
@michalmarcinkowski because I replaced FileType
with ImageType
for images and it seem to behave differently.
@michalmarcinkowski simply because there are no test for "editing a block with image" :/
That's bad... @kochen are you able to fix the issue?
@michalmarcinkowski not from the little time I invested in it.
The problem seems to be much deeper than this plugin and CmfMediaBundle
is abandoned anyway so you should consider some alternatives for the future anyway...
Thanks for the feedback, if you will have any more information that could help, please share it with us 😉
@michalmarcinkowski first thing I'm trying to do is write some tests which will show the problem. Any help you could provide here (specially on the factory/image)?
@michalmarcinkowski the problem is somewhere in the actual generation of the image:
instead of belonging to the actual content-block parent, it is independent and therefor a second block with an image will try to save another /cms/media/image
which already exists...
fixes #31 replaces #63