Skip to content

Apache Lucene open-source search software

SOLR-3660: Velocity: Link to admin page broken

Jan Høydahlfa469cbbdb91
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index faa7e83cc4f..8909fe9c292 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -115,6 +115,8 @@ Bug Fixes
* SOLR-3642: Correct broken check for multivalued fields in stats.facet
(Yandong Yao, hossman)
+* SOLR-3660: Velocity: Link to admin page broken (janhoy)
+
Other Changes
----------------------
diff --git a/solr/example/solr/collection1/conf/velocity/VM_global_library.vm b/solr/example/solr/collection1/conf/velocity/VM_global_library.vm
index eae1bfebfb8..4f4d0a5a1fe 100644
--- a/solr/example/solr/collection1/conf/velocity/VM_global_library.vm
+++ b/solr/example/solr/collection1/conf/velocity/VM_global_library.vm
@@ -4,6 +4,7 @@
#macro(url_root)/solr#end
## TODO: s/url_for_solr/url_for_core/ and s/url_root/url_for_solr/
+#macro(core_name)$request.core.name#end
#macro(url_for_solr)#{url_root}#if($request.core.name != "")/$request.core.name#end#end
#macro(url_for_home)#url_for_solr/browse#end
diff --git a/solr/example/solr/collection1/conf/velocity/layout.vm b/solr/example/solr/collection1/conf/velocity/layout.vm
index ff6da5f3f40..652872c626b 100644
--- a/solr/example/solr/collection1/conf/velocity/layout.vm
+++ b/solr/example/solr/collection1/conf/velocity/layout.vm
@@ -3,7 +3,7 @@
#parse("head.vm")
</head>
<body>
- <div id="admin"><a href="#url_for_solr">Solr Admin</a></div>
+ <div id="admin"><a href="#url_root/#/#core_name">Solr Admin</a></div>
<div id="header">
#parse("header.vm")
</div>