Skip to content

Commit

Permalink
use uncached JS routes, fixed #3807, refs #3084
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Oct 2, 2017
1 parent d63a381 commit 78d9e04
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,19 @@ private function addJquery()

private function addFosJsRouting()
{
if ($this->params['env'] != 'dev' && file_exists(realpath('web/js/fos_js_routes.js'))) {
// commented out as a workaround for #3807 until #3804 is solved
/*if ($this->params['env'] != 'dev' && file_exists(realpath('web/js/fos_js_routes.js'))) {
$this->jsAssetBag->add([
$this->assetHelper->resolve('bundles/fosjsrouting/js/router.js') => AssetBag::WEIGHT_ROUTER_JS,
$this->assetHelper->resolve('js/fos_js_routes.js') => AssetBag::WEIGHT_ROUTES_JS
]);
} else {
} else {*/
$routeScript = $this->router->generate('fos_js_routing_js', ['callback' => 'fos.Router.setData']);
$this->jsAssetBag->add([
$this->assetHelper->resolve('bundles/fosjsrouting/js/router.js') => AssetBag::WEIGHT_ROUTER_JS,
$routeScript => AssetBag::WEIGHT_ROUTES_JS
]);
}
/*}*/
}

private function addJsTranslation()
Expand Down

0 comments on commit 78d9e04

Please sign in to comment.