FriendsOfSymfony / FOSJsRoutingBundle

A pretty nice way to expose your Symfony routing to client applications.
1.48k stars 261 forks source link

Port number is duplicated on absolute path generation with non-standard ports #379

Closed robertosanval closed 4 years ago

robertosanval commented 4 years ago

I've discovered a weird problem.

When I use non-standard ports on my local dev server the generated URLs duplicates the port.

This is the code:

url = Routing.generate('style_new', { 'id': id }, true);
console.log(url);

I get this URL: https://localhost:4443:4443/admin/style/new/5

pierre-H commented 4 years ago

same problem

YoannChabert commented 4 years ago

Maybe its the same problem as #377 ?

Check the version of symfony/serializer (version 5.0.5 have issues for me, not 5.0.4)

@pierre-H @robertosanval

robertosanval commented 4 years ago

Thanks @YoannChabert but I'm using symfony/serializer 4.4.0

YoannChabert commented 4 years ago

I don't know if that can help, but i tried again the version 5.0.5 and it works ! But I also deleted all the content of bundles/* in my Symfony Project. Have you tried this ? @robertosanval

ViniTou commented 4 years ago

If there is an option this bug was introduced here? As i see that setting absolute to true is what kinda triggers it. as I have same bug on serializer 5.0.5 and 5.0.4. https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/361/files @YoannChabert @robertosanval

wadjeroudi commented 4 years ago

@ViniTou I think you're right about this PR, I had to downgrade to fos js routing bundle to ~2.4.0.

robertosanval commented 4 years ago

Thanks for the fix!