1
votes

I use SonataMediaBundle with SonataAdminBundle with a simple install.

When i want to add a new media. I can select what provider i want. I configured it to show Daylimotion, Youtube and Image.

The Youtube and Image picture doesn't appears. I can see the error

GET http://my_url/web/data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOcA…/kI5CVlcXzqGKBtUyZMjz8qd9WApPTb0NUnhAgBPwh8D8I22yw4XkRvwAAAABJRU5ErkJggg== 414 (Request-URI Too Long) 

Second problem come when i upload an image. I got:

request failed: URI too long (longer than 8190)

I try the js i found at http://sonata-project.org/bundles/admin/master/doc/reference/troubleshooting.html but it doesn't work.

Edit: I change my SonataMediaBundle version from 2.3 to dev-master. Now i can see the youtube logo but still have the too long uri error.

3
The issue is caused by insufficient URI length limitations in the default Apache configuration. Maybe you have problem in base64 encoding because base64 encoding increases size of the original data<br /> - Srdjan
Try to send data via POST instead of GET. - Srdjan
I know what's the problem. I don't know how to solve it with the SonataMediaBundle. - Sancho
How you got this URL: GET my_url/web/data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOcA…/kI5CVlcXzqGKBtUyZMjz8qd9WApPTb0NUnhAgBPwh8D8I22yw4XkRvwAAAABJRU5ErkJggg== - Srdjan
The bundle give it. I want to change that but i don't know how. - Sancho

3 Answers

1
votes

I faced the same issue. I was using the sonata core 2.3.1 and changed to 2.3.0, This solved it. It seems that the 2.3.3 also having the same issue.

So make sure you downgrade your sonata core in composer.json until they fixed the issue. It is better to downgrade to a stable version than using the dev branch.

"sonata-project/core-bundle": "2.3.0"

By the way, i'm using the 2.3.1 for MediaBundle.

issue

0
votes

Problem solved with an update to dev-master and a cache:warmup !

0
votes

Please use only stable version otherwise you might have some WIP issues...