Last Updated: May 31, 2016
·
644
· pandrieux

Double slash (//) issue in fos js-routing generated urls

There is an incomptability between fos js-routing bundle and the way we handle mails sent by symfony commands.
To make commands able to send mail, we use this config in parameters.yml:

router.request_context.host: my_website.com
router.request_context.scheme: http
router.request_context.base_url: /

and this config for fos js-routing:

fos_js_base_url: 'http://my_website.com/'

This config results to generate double slashes in generated urls in emails.

You have to delete this config line to make it work:
router.requestcontext.baseurl: /

The final good config is:

router.request_context.host: my_website.com
router.request_context.scheme: http
fos_js_base_url: 'http://my_website.com/'