-
- Downloads
[FIX] website_blog: prevent params to be lost when only one blog
With DB having only one blog (most common case, but we are used to test
it with demo data where we have two), the query params are lost when
accessing the blog controller without passing a blog.
Eg, `/blog?search=hubble` will redirect to `/blog/traval-1`
This is because the business code is doing an early redirect if we
access the `/blog` URL without a blog post passed to it to redirect to
that blog post URL directly (since there is only one), but that redirect
is not passing the query parameters.
The main impacted params are `state`, `order` and `search` but it's the
same for all others.
Step to reproduce (in later version):
- Be sure to only have one blog
- Drag & drop the search snippet in the homepage or anywhere
- Make it search on blog only (through the snippet option)
Type anything, it will not work and won't do the search. It will just
redirect to the blog page.
closes odoo/odoo#113855
Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
Loading