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

Error when creating a block with an image #35

Closed
relte opened this issue Feb 17, 2017 · 4 comments · Fixed by #48
Closed

Error when creating a block with an image #35

relte opened this issue Feb 17, 2017 · 4 comments · Fixed by #48
Labels

Comments

@relte
Copy link

relte commented Feb 17, 2017

The following error occurs when trying to create a block with an image:

The class 'Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image' was not found in the chain configured namespaces FOS\OAuthServerBundle\Document, Doctrine\ODM\PHPCR\Document, Lakion\SyliusCmsBundle\Document, Symfony\Cmf\Bundle\BlockBundle\Model, Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr, Symfony\Cmf\Bundle\ContentBundle\Model, Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr, Symfony\Cmf\Bundle\MenuBundle\Model, Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr, Symfony\Component\Routing, Symfony\Cmf\Bundle\RoutingBundle\Model, Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr

@pamil
Copy link
Contributor

pamil commented Feb 17, 2017

It's caused by symfony-cmf/block-bundle#274.

We need to revert that PR in our repository.

@pamil pamil added the Bug label Feb 17, 2017
@ghost
Copy link

ghost commented Apr 6, 2017

@pamil, actually it's not a problem. I tried to install the previous version of symfony-cmf/block bundle (the 2.0.0-RC1) and it caused the same result. The error is thrown because of missing new \Symfony\Cmf\Bundle\MediaBundle\CmfMediaBundle() declaration in AppKernel.php file.
There are also few routing files that are required for this bundle:

#shop_routing.yml:
...
cmf_media_file:
    resource: "@CmfMediaBundle/Resources/config/routing/file.xml"

cmf_media_image:
    resource: "@CmfMediaBundle/Resources/config/routing/image.xml"

_liip_imagine:
    resource: "@LiipImagineBundle/Resources/config/routing.xml"

To make things work together phpcr repository has to be initialized once again:

bin/console doctrine:phpcr:repository:init

Unfortunately the CmfMediaBundle is no longer maintained which can cause more issues in future develompent.

@kochen
Copy link

kochen commented Jul 25, 2017

This issue still exists.

@kochen
Copy link

kochen commented Aug 15, 2017

@michalmarcinkowski, @pamil, Any chance for anyone to re-review this?

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.

3 participants