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

JSON.parse syntax error #20

Closed
Tersoal opened this issue Nov 15, 2014 · 7 comments
Closed

JSON.parse syntax error #20

Tersoal opened this issue Nov 15, 2014 · 7 comments

Comments

@Tersoal
Copy link

Tersoal commented Nov 15, 2014

Hi all.

I've a syntax error in the options parsing in twig:

fields.html.twig line 54: {{ options | json_encode() | raw }}

I think that uploadConfig object isn't properly parse, because the slash in the routes are not escaped (they are '' instead of '').

Is this possible?

@Tersoal
Copy link
Author

Tersoal commented Nov 15, 2014

I use windows, y don't know if I've problems with routes, because windows uses \ instead of /

@Tersoal
Copy link
Author

Tersoal commented Nov 15, 2014

Yes, the problem is the \ generate by windows instead of /.

I've resolved it replacing the urls \ in CroppableImageType, before line 139:

    foreach($options['uploadConfig'] as $key => $optiontotransform) {
        $options['uploadConfig'][$key] = str_replace('\\', '/', $optiontotransform);
    }

It would be no problem in linux machines, I hope. And this will resolve the problem in all environments.

@comur
Copy link
Owner

comur commented Nov 17, 2014

Hi,

I've never tested in Windows environment so thanks for your tip. Can you
create a PR so others can also use your workaround please ?

Thanks

Can OMUR
omur.can@gmail.com
+33 (0)6.79.66.58.28

2014-11-16 0:53 GMT+01:00 Tersoal notifications@github.com:

Yes, the problem is the \ generate by windows instead of /.

I've resolved it replacing the urls \ in CroppableImageType, before line
139:

foreach($options['uploadConfig'] as $key => $optiontotransform) {
    $options['uploadConfig'][$key] = str_replace('\\', '/', $optiontotransform);
}

It would be no problem in linux machines, I hope. And this will resolve
the problem in all environments.


Reply to this email directly or view it on GitHub
#20 (comment)
.

@Tersoal
Copy link
Author

Tersoal commented Nov 17, 2014

Sure. I'll try it, due to I'm not skilled in fork projects. And I'll try to fork both branches, because I'm using only the bootstrap 3 branch.

Please, test my updates in unix to be sure that it works in all environments.

Thanks.

@comur
Copy link
Owner

comur commented Nov 17, 2014

Ok, but you can just fork master and send me PR on master, i'll merge
master on 1.0 anyway

Can OMUR
omur.can@gmail.com
+33 (0)6.79.66.58.28

2014-11-17 10:00 GMT+01:00 Tersoal notifications@github.com:

Sure. I'll try it, due to I'm not skilled in fork projects. And I'll try
to fork both branches, because I'm using only the bootstrap 3 branch.

Please, test my updates in unix to be sure that it works in all
environments.

Thanks.


Reply to this email directly or view it on GitHub
#20 (comment)
.

@Tersoal
Copy link
Author

Tersoal commented Nov 17, 2014

OK, perfect.

I'll review some features that does not works very well, like upload image button. I'll update all that I view wrong.

Cheers.

@Tersoal
Copy link
Author

Tersoal commented Nov 17, 2014

Pull request done.

@comur comur closed this as completed Nov 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants