ckanext-showcase icon indicating copy to clipboard operation
ckanext-showcase copied to clipboard

Problem with url_for and /showcases redirect

Open torfsen opened this issue 8 years ago • 0 comments

I am dynamically constructing links for listing showcases by tag:

<a href="{% url_for controller='showcase', action='search', tags=tag.name %}">{{ h.truncate(tag.display_name, 22) }}</a>

The url_for call returns an URL for /showcases (trailing s):

http://localhost:5000/showcases?tags=interaktiv

That URL is then redirected to /showcase (no trailing s), but the query parameters are lost:

ckanext_showcase_redirect_bug

Either the redirect should also forward the query parameters or url_for should return the correct URL. What's the rational behind having both /showcase and /showcases?

torfsen avatar Apr 25 '16 14:04 torfsen