Skip to content
Snippets Groups Projects
user avatar
qsm-odoo authored
Before this commit, following these steps:
- Go to /blog
- Activate the option Customize > Top banner - Name / Latest Post
- Disable the option Customize > Full Width Cover

The URL to which we are redirected when we click on the blog of the
post presented at the top of the page leads to an error.

Indeed the URL of that link is something like "/blog?blog=blog.blog(2,)"
because of the template wrongly using the 'blog_url' QueryURL which is
defined in the case where we are rendering a blog page where no specific
blog is selected. We define that as `QueryURL('/blog', ['tag'], ...)`
but then parts of the template used it like this: `blog_url(blog=X)`
thus generating an URL like "/blog?blog=blog.blog(2,)". Adding "blog" to
the list of params would not be right as would create "/blog/blog/2"
which is still wrong as we want "/blog/2". And of course the "/blog"
prefix in the QueryURL definition is needed in case we only specify a
tag via `blog_url(tag=X)` (we expect /blog/tag/X). Patching QueryURL or
making blog_url a custom function instead of a QueryURL instance could
be a solution but it was judged not stable enough. We'll do that in
master. Here we only support "/blog?blog=blog.blog(2,)" URLs.

Note that many parts of those templates do not use the `blog_url`
function and simply build the URL by hand, which is why the bug only
occurred for a very specific set of blog options.

opw-2882492

X-original-commit: f32992de
Part-of: odoo/odoo#104203
Co-authored-by: default avatarGuillaume (gdi) <gdi@odoo.com>
82472731
History

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials